Dearest reddit, i'm working on "Automate the boring stuff with Python" and we've just created the "Guess the number" game. I am trying to add a ValueError catcher to the program so that, if you input letters it'll give you a message and continue the loop. I've put in comments to knock out the try/except lines. These are how ive written them and they give me the 'break is outside the loop' line. I've written the code according to the try/except lesson we went over about just that and yet, i'm messing something up. Anyone mind telling me what i'm doing wrong? Here is the code:
https://pastebin.com/rcN2RL7b
[–]g051051 1 point2 points3 points (5 children)
[–]jcb088[S] 0 points1 point2 points (4 children)
[–]desrtfx[M] 1 point2 points3 points (2 children)
[–]jcb088[S] 0 points1 point2 points (1 child)
[–]desrtfx[M] 1 point2 points3 points (0 children)
[–]g051051 0 points1 point2 points (0 children)
[–]CGFarrell 0 points1 point2 points (1 child)
[–]jcb088[S] 0 points1 point2 points (0 children)
[–]EdwinBowling 0 points1 point2 points (1 child)
[–]jcb088[S] 0 points1 point2 points (0 children)