Help with exercise

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))

should print 100

Could you please add a link to the lesson you’re working on and please format your code for the forums, details at the following FAQ.

Of course

https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-functions/articles/python-code-challenges-functions

thanks

You should double check the formula used for a percentage as you’d need both wins and losses in the calculation and the multiplicative factor would be 100.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.