Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:error': 0.03; 'subject:Python': 0.06; 'wednesday,': 0.07; 'parsing': 0.09; 'type,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '32,': 0.16; 'eof': 0.16; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'message-id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'statements,': 0.16; 'subject: \n ': 0.16; 'subject:program': 0.16; 'syntaxerror:': 0.16; 'tjg': 0.16; 'unexpected': 0.16; 'which,': 0.16; 'wrote:': 0.18; 'input': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; '2.x': 0.24; 'received:192.168.100': 0.24; 'text.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'see,': 0.30; 'gives': 0.31; '"",': 0.31; 'prints': 0.31; 'file': 0.32; '(most': 0.33; 'trouble': 0.34; 'message.': 0.35; 'subject:with': 0.35; 'doing': 0.36; 'should': 0.36; 'recent': 0.39; "you're": 0.61; 'press': 0.70; 'subject:get': 0.81; 'from:addr:mail': 0.83; 'to:none': 0.92; '2013': 0.98 Date: Wed, 05 Jun 2013 16:23:36 +0100 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: I just wrote my first Python program a guessing game and it exits with an error I get this. References: <498fb115-8568-478d-8443-1be20dd5c335@googlegroups.com> <5d967bc8-2ae4-4844-8e20-631364f75037@googlegroups.com> In-Reply-To: <5d967bc8-2ae4-4844-8e20-631364f75037@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370445820 news.xs4all.nl 15986 [2001:888:2000:d::a6]:58610 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47093 On 05/06/2013 16:14, Armando Montes De Oca wrote: > On Wednesday, June 5, 2013 10:40:52 AM UTC-4, Armando Montes De Oca wrote: >> Traceback (most recent call last): >> >> File "Guessing_Game.py", line 32, in >> >> input (enter) >> >> File "", line 0 >> >> ^ >> >> SyntaxError: unexpected EOF while parsing Armando. Try this at a Python prompt, and just press Enter without entering any text. input("Please enter something:") The trouble is that the beguilingly-named "input" function actually *evaluates* what you type, ie it's the same as doing this: eval("") which, as you can see, gives the same error message. You're clearly using Python 2.x as your prints are statements, so input has this characteristic. Instead you should use raw_input: raw_input(enter) TJG