New User-Need-Help

D

Deborah Piotrowski

Hi,


I am very new to Python, I am using the e-book "Python Programming for the
Absolute Beginner" and am starting with a simple "Game Over" Program. This
is the code:which is extremely simple!
print"Game Over" raw_input("\n\nPress Enter Key to exit")
That's it. It is supposed to bring up a window that says "Game Over" and at
the bottom say "Press enter Key to exit" and when you press the enter key
it is supposed to exit(big suprise).
But all it does is highlight "raw_input" and says "invalid syntax" Now, if
I just put "print "Game Over"" then it says Game Over UNDERNEATH the code I
just printed!
now I am following the book to the *pixel* and that is not what is supposed
to happen!
Please email me back as soon as you get this...(if you are not to busy).

Thanks,Nicholas
 
J

John Gordon

In said:
This is the code:which is extremely simple!
print"Game Over" raw_input("\n\nPress Enter Key to exit")
That's it.

Does your code really have everything on one line, as you posted? If so,
that's the problem. It should be broken into two separate lines:

print "Game Over"
raw_input("\n\nPress Enter Key to exit")

I can't believe the book put all that code on one line...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top