Code not working plz help


#1

from random import randint

random_number = randint(1, 10)

guesses_left = 3

while guessesleft > 0:
guess = int(rawinput("Guess a # 1-9:"))
if guess == randomnumber:
print "You win!"
break
else:
print "Try again:"
guessesleft -= 1
else:
print "You lose."

#2

please post your code with markup:

so the indent shows


#3

You need to use raw_input()


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.