It is helpful to know the exact error message (cut and paste) and the version
of Python you are using. In Python 3.x the print statement would produce a
syntax error. In any Python "raw input" is a syntax error. "raw_input" is the
correct function name, unless you are using 3.x where it was renamed to "input".
In Python 2.x:
print "Game Over"
raw_input("\n\nPress the enter key to exit.")
In Python 3.x:
print("Game Over")
input("\n\nPress the enter key to exit.")
-Mark
"John Jenkinson" <[email protected]> wrote in message
news:[email protected]...
I am trying to write a program that displays the string expression "Game
Over", in a console window that remains open.
my code is as follows:
# Game Over console window
print "Game Over"
raw input("\n\nPress the enter key to exit.")
The error I am recieve is "There is an error in your program: invalid syntax".
I dont understand what is supposed to happen if the code were to be correct.
Would a separate console be displayed with the text "Game Over", or would I see
the output in the Interactive Mode window?
Excuses my noviceness, I just started using python tonight.
------------------------------------------------------------------------------
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor