In this particular exercise we are asked to find the win percentage when we are given two parameters “wins” and “losses”.
The mathematical solution would be (win / wins + losses) * 100%.
Now here’s my question, when I used the return as (win / wins + losses) * 100, with the value (5,5) the result was 600.0, when it was supposed to be 50.
Why did I get this ?
When I looked in the solution it was basically the same thing they did but with more steps. They created different variables to first add wins and losses then multiply by 100 separately. Isn’t this the same thing?