I'm stuck on exercise 14.8 - Your own while / else
The code looks right, but whenever I try to run it, in throws an invalid syntax error for line 11 (a print statement). In earlier exercises, codecademy was fine with the print statement instead of the function, so I used that. I tried the function too and it didn't work either.
from random import randint random_number = randint(1, 10) guesses_left = 3 while guesses_left > 0: guess = int(input("Your guess: ") if guess == random_number print "You win!" break guesses_left -= 1 else: print "You lose."