Please answer it in Python Write a function show_scores that takes as arguments a dictionary of score scores and a character string nature and ‑ache the scoreboard. Generally, nature will take the value "Round" or "Part" but one could imagine having other values. The order in which the players are aché ‑is irrelevant. We will respect the format of the ‑following achage obtained for the execution of For example: show_scores({'tata': 3,'titi': 12,'toto': 0}, "Round"), (with 3 space in front of each player's name): #return => Round scores: tata : 3 point(s) titi: 12 point(s) toto : 0 point(s) show_scores({'bata': 6,'biti': 1,'boto': 2}, "Part") #return => Part scores: bata : 6 point(s) biti: 1 point(s) boto : 2 point(s)
Please answer it in Python
Write a function show_scores that takes as arguments a dictionary of score scores and a character string nature and ‑ache the scoreboard.
Generally, nature will take the value "Round" or "Part" but one could imagine having other values. The order in which the players are aché ‑is irrelevant. We will respect the format of the ‑following achage obtained for the execution of
For example:
show_scores({'tata': 3,'titi': 12,'toto': 0}, "Round"), (with 3 space in front of each player's name):
#return =>
Round scores:
tata : 3 point(s)
titi: 12 point(s)
toto : 0 point(s)
show_scores({'bata': 6,'biti': 1,'boto': 2}, "Part")
#return =>
Part scores:
bata : 6 point(s)
biti: 1 point(s)
boto : 2 point(s)
Step by step
Solved in 2 steps with 1 images