I just wrote my first Python program a guessing game and it exits with an error I get this.
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Jun 5 22:08:05 EDT 2013
On Wed, 05 Jun 2013 07:40:52 -0700, Armando Montes De Oca wrote:
> Traceback (most recent call last):
> File "Guessing_Game.py", line 32, in <module>
> input (enter)
> File "<string>", line 0
> ^
> SyntaxError: unexpected EOF while parsing
Your problem is that you should not be using input(), but raw_input()
instead.
Replace every call to input() to raw_input() instead, and this specific
problem will go away. It may reveal other bugs, but that's programming
for you.
--
Steven
More information about the Python-list
mailing list