+ 3
Why does this while loop not work?
5 Answers
+ 4
Everything from 'Player 1s score' (line 35) to the end (line 60) is outside of the loop.
s1 and s2 are only modified outside the loop, so the while loop is infinite. This is why 'time exceeded' is popping up with no other output.
Indent the code from line 35 to line 60 so that it is inside the while loop.
+ 3
I think it's your indentation, none of the code with the ifs are inside the while loop causing it to loop infinitely. Unless it's just a mobile display issue
+ 3
I'm new to programming and to Python, what is indentation?
+ 2
Thanks
+ 1
It might be worth reviewing the tutorial again. The first word on each line starts in a different place, having some whitespace in front of it. This is indentation, and in Python it determines what lies 'inside' a statement.