here's my code:
while guesses_left > 0: guess = int(raw_input("your guess: ")) if random_number == guess: print 'You win!' break else: print "You lose." guesses_left -= 1
It runs fine, it asks for three guesses and responds telling me if its true or false, but the program wants me to to put the else function outside of the while loop.Why does it ask that? i mean it does what it asks for, so why does it need to be outside the while loop?
is there something i don't understand?