The code does what is is supposed to but I keep getting the error:
"Oops, try again. Make sure to decrement guesses_left!"
from random import randint random_number = randint(1, 10) print random_number guesses_left = 3 print "Guesses left",guesses_left while guesses_left > 0: guess = int(raw_input("Your guess: ")) if guess != random_number: guesses_left = (guesses_left -1) print "Guesses left",guesses_left if guess == random_number: print "You win!" break if guesses_left <= 0: print "You Loose!" break else: print "You loose!"
I know that I am doing something different then the lesson wants me to because "else" is unneeded, and the directions say to have it.
Thanks for the help you guys:sweat_smile: