14/8 Your own while / else


#1



https://www.codecademy.com/courses/python-beginner-en-cxMGf/0/8?curriculum_id=4f89dab3d788890003000096

this error occured:
Oops, try again. Make sure you store the user guess in a variable called "guess".

don't really understand why this is happening. some help would be great.


from random import randint

# Generates a number from 1 through 10 inclusive
random_number = randint(1, 10)

guesses_left = 3
while guesses_left < 0:
    guess = int(raw_input("Your guess: "))
    
    if guess == random_number:
        print "You win!"
        break

else:
    print "You lose."
    guesses_left -= 1


#2

Hi this part

while guesses_left < 0

guesses_left will never be less than 0 so you should put guesse_left great than 0


#3

okay thank you, this help alot