I am not stuck per se. Codecademy allowed me to move on to the next exercise but I can not get my code to hit the winning condition even when my guess = the random number. If you have any advice it would be appreciated.
from random import randint # Generates a number from 1 through 10 inclusive random_number = randint(1, 10) # print "Number is",random_number guesses_left = 3 # Loop allows user to guess a random number three times. while guesses_left > 0: # Retrieves guess with input verification loop guess = raw_input("Guess a number between 1 to 10: ") while 0 <= guess <= 10: guess = raw_input("Guess a number between 1 to 10: ") # Testing logic(when guess == random_number it is returning False) print "Random Number is:",random_number print "Your guess is:",guess test = guess == random_number print "Random Number == guess:",test # End of testing logic # Ends loop when random number is guessed. if guess == random_number: print "You win!" break # Prompts user to try again if there are guesses left. elif guesses_left > 1: print "Try Again" # Decrementation of Guesses left guesses_left -= 1 # Prompt that user loses when guesses_left == 0 and they did not guess the correct #. else: print "You Lose"