Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38961 > unrolled thread

New User-Need-Help

Started byDeborah Piotrowski <spiceninja4u@gmail.com>
First post2013-02-15 14:45 -0700
Last post2013-02-15 22:59 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  New User-Need-Help Deborah Piotrowski <spiceninja4u@gmail.com> - 2013-02-15 14:45 -0700
    Re: New User-Need-Help John Gordon <gordon@panix.com> - 2013-02-15 22:59 +0000

#38961 — New User-Need-Help

FromDeborah Piotrowski <spiceninja4u@gmail.com>
Date2013-02-15 14:45 -0700
SubjectNew User-Need-Help
Message-ID<mailman.1848.1360964736.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [next] | [standalone]


#38967

FromJohn Gordon <gordon@panix.com>
Date2013-02-15 22:59 +0000
Message-ID<kfmek0$ii1$1@reader1.panix.com>
In reply to#38961
In <mailman.1848.1360964736.2939.python-list@python.org> Deborah Piotrowski <spiceninja4u@gmail.com> writes:

> 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...

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web