How can I eliminate this infinite loop? 14/8 Your own while/else


Hi, I am unable to get rid of this infinite loop and I would greatly appreciate help. Here is my code:

from random import randint

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

guesses_left = 3
guess = int(raw_input("What's your guess?"))
while guesses_left > 0:
    if guess == random_number:
        print "You win!"
        print "Guess again."
        guesses_left -= 1
    print "You lose."

And here's what the interpreter gives me:

What's your guess? 3
Guess again.
Guess again.
Guess again.
You lose.

It takes 3 as the guess for all 3 turns. Help would be greatly appreciated - thanks!


Never mind. I kept working on it and solved it. Thanks if you were willing to help though.