Python your own while/else


hello, i need help for this exercise. My code is:

from random import randint

Generates a number from 1 through 10 inclusive

random_number = randint(1, 10)

guesses_left = 3

while guesses_left>0:
random_number = randint(1,10)
guess = (int(raw_input("Your guess: ")
if guess == random_number
print "You win!"
guesses_left -=1
print "You lose."

The error i get is this.
File "python", line 12
print 'You win!'
SyntaxError: invalid syntax

this makes no sense to me. Any ideas, what might be wrong?


look at the parentheses at the line above the error


Thanks :slight_smile: