8/19 Does not work for me


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!"
guesses_left -= 1
elif guesses_left > 0:
print 'Guess again.'
print "You lose."

Loops 8/19; You Own While/Else

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.