I have passed the test but it seems to me that the process I did is not the correct one, I would like to ask for your collaboration to know what is the correct way to solve it.
Exercise
Create a function called win_percentage()
that takes two parameters named wins
and losses
.
This function should return out the total percentage of games won by a team based on these two numbers.
this is my solve:
Write your win_percentage function here:
def win_percentage(wins,losses):
return wins*10
Uncomment these function calls to test your win_percentage function:
#print(win_percentage(5, 5))
print(win_percentage(5,5))
should print 50
#print(win_percentage(10, 0))
print(win_percentage(10,0))