[Tutor] Syntax error
johnjenkinson1 at gmail.com
Mon Mar 23 05:34:28 CET 2009
I understand. I am following a tutorial that has a typo.
Quoting from the text:
The last line of the program:
raw input("\n\nPress the enter key to exit.")
I enjoyed your intuitive explanation, thank you.
On Sun, Mar 22, 2009 at 11:30 PM, Marc Tompkins <marc.tompkins at gmail.com>wrote:
> On Sun, Mar 22, 2009 at 8:35 PM, John Jenkinson <johnjenkinson1 at gmail.com
> > wrote:
>> 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.")
> Assuming that you've posted exactly what's in your program, the problem is
> "raw input()" (which would mean 'execute a statement called raw, with an
> input() function following it') instead of "raw_input()". Since there isn't
> a built-in statement called "raw", you get the syntax error.
> Spelling counts.
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor