Okay so i'm not really comprehending why this isn't working...
from random import randint random_number = randint(1, 10) guesses_used = 0 guesses_left = 3 while guesses_left >= 1 and guesses_left <= 3: guess = int(raw_input("Your guess: ") if guess == random_number: print 'You win!' break elif guess != random_number: guesses_used += 1 guesses_left -= 1 print 'Incorrect! You\'ve used %s guesses. You have %s guesses left!' (guesses_used, guesses_left) else: print 'You lose.' break
I get this error for some reason:
Please send some feedback my way, any help is appriciated!