Syntax error


#1

I keep getting a syntax error and I don't know why

My Code:

from random import randint

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
elif guess != random_number:
print "You guessed incorrectly"
guesses_left -= 1
else:
print "You lose"

The error:

File "python", line 10
if guess == random_number:
^
SyntaxError: invalid syntax


#2

take a look at this line:

guess = int(raw_input("Your guess: ")

the number of opening brackets ((), doesn't match the number of closing brackets ())