I'm having trouble with a "Syntax Error: invalid syntax" message in python code that keeps moving the goals posts on me.
Here's the sample code:
another_answer = int(raw_input("> ")
if another_answer == 1:
print "The pirate's body slowly goes limp and he whispers to you......."
print "Good luck my son. You might need this."
get_gold()
print: "Do you want to continue to the next room?"
When I run this in the shell I get the following:
File "ex36.py", line 179
if another_answer == 1:
^
SyntaxError: invalid syntax
I found this bizarre, and after removing the colon I got an error message on the next line:
File "ex36.py", line 180
print "The pirate's body slowly goes limp and he slowly whispers to you......."
^
SyntaxError: invalid syntax
Similar questions I've found on stackoverflow center around improper spacing and indentation, but I've looked that over and everything seems to be well.
See Question&Answers more detail:os