I cant see what ive done wrong


#1


<.>


from random import randint

# Generates a number from 1 through 10 inclusive
random_number = randint(1, 10)

guesses_left = 3
while guesses_left > 0:
    guess = int( raw_input("your guess: ")
    if guess == random_number:
        print 'You win!'
        break
    guesses_left -= 1
else:
    print "You lose."


#2

You forget the 2nd parentheses after the "Your guess:" string.


#3

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