[Tutor] Syntax error

John Jenkinson 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.
>
> --
> www.fsrtechnologies.com
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090322/0226df3f/attachment.htm>


More information about the Tutor mailing list