Why does it say “Invalid Syntax” When I try to print something in Python? [duplicate]
Why does it say “Invalid Syntax” When I try to print something in Python? [duplicate] This question already has an answer here: When I try to run my Python code in Idle (on a Mac), is says 'invalid syntax' On my quotation marks. Does anyone know why? from goto import goto, label import random tries = 0 r = int(100 * random.random()) + 1 label .guess guess = int(raw_input("Please guess the number between 1 - 100: ")) if guess == r: tries += 1 print "You are correct! It took you " + str(tries) + " tries!" if guess > r: print"Too high... Try again" tries += 1 goto .guess if guess < r: print"Too low... Try again." tries += 1 goto .guess exit Does any one know why this might not work? The line that has an error is this one: print "You are correct! It took you " + str(tries) + " tries!" It is the second quotation mark. This question has been asked before and already has an ...
