Simple Guess My Number Game in Python - invalid syntax
Question: I try to make a simple guessing game with the "Python programming for absolute
beginner" book. Game should generate random number from 0 to 10, then take
player's guesses and print "Too high!", if the guessed number is too high, or
"Too low!" if the number is too low. After each guess, game adds 1 to the
number of guesses. It ends, when the player's guess is correct and displays
number of guesses taken.

My code is exactly the same, as code in the book, but when I run it in IDLE, I
get "invalid syntax" error on "tries += 1" line. When I delete this line, the
error happens on the next line etc. When I run it from file, it just opens and
closes immediately. I use Python 3.4.1.

    
    
    import random
    
    number = random.randint(0,10)
    player_guess = int(input("What's your guess?"))
    tries = 1
    while player_guess != number:
        if player_guess > number:
                print("Too high!")
        else:
                print("Too low!")  
        player_guess = int(input("What's your guess?")
        tries += 1
    print("Congrats!")
    print(tries)
    input("\n\nPress any key...")
    


Answer: You're missing a closing parentheses `)` on the above line to complete the
`int` conversion.

