29th Jan 2018, 8:20 PM
Raphael Shay
Raphael Shay - avatar
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.
29th Jan 2018, 8:39 PM
Rrestoring faith
Rrestoring faith - avatar
+ 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
29th Jan 2018, 8:39 PM
Dan Walker
Dan Walker - avatar
+ 3
I'm new to programming and to Python, what is indentation?
30th Jan 2018, 6:07 AM
Raphael Shay
Raphael Shay - avatar
+ 2
Thanks
30th Jan 2018, 7:45 AM
Raphael Shay
Raphael Shay - avatar
+ 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.
30th Jan 2018, 7:15 AM
Dan Walker
Dan Walker - avatar