8/19 Does not work for me


#1

Does not work for me. Here is my code:
from random import randint

random_number = randint(1, 10)

while guesses_left > 0:
guess = int(raw_input("Your guess: "))
if guess == random_number:
print "You win!"
break
guesses_left -= 1
elif guesses_left > 0:
print 'Guess again.'
else:
print "You lose."


Loops 8/19; You Own While/Else
#2

Try moving this down one line to inside the elif.

Aside: Please look around the FAQ's or other discussions on the subject of Code Formatting in topic openers and replies. Thank you.