Oct-15-2020, 05:07 PM
Don't forget that you can just add a simple print statement
print(r)
to see what the value of r is at any given point. Printing your variables to see what they contain is a common debugging technique. If you think you have a string value of '15' or '20' in r, but your program still displays "lose", then you can be pretty certain that r doesn't contain what you think it does. Printing r on the line preceding your if/else clauses will help you find the problem.