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


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

I just wrote my first Python program a guessing game and it exits with an error I get this.

Started byArmando Montes De Oca <armandomontesdeocaiii@gmail.com>
First post2013-06-05 07:40 -0700
Last post2013-06-06 07:49 -0700
Articles 4 on this page of 24 — 11 participants

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


Contents

  I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 07:40 -0700
    RE: I just wrote my first Python program a guessing game and it exits with an error I get this. Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-05 18:07 +0300
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Alister <alister.ware@ntlworld.com> - 2013-06-05 15:11 +0000
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 08:14 -0700
      Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Tim Golden <mail@timgolden.me.uk> - 2013-06-05 16:23 +0100
      Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Zachary Ware <zachary.ware+pylist@gmail.com> - 2013-06-05 10:38 -0500
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 08:16 -0700
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 08:18 -0700
      Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-05 16:25 +0100
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 08:35 -0700
      Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Zachary Ware <zachary.ware+pylist@gmail.com> - 2013-06-05 11:15 -0500
        Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 12:59 -0700
          Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Thomas Murphy <thomasmurphymusic@gmail.com> - 2013-06-05 16:18 -0400
          Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Chris Angelico <rosuav@gmail.com> - 2013-06-06 06:23 +1000
          Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-05 16:32 -0400
      Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-05 12:30 -0400
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 08:56 -0700
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 09:01 -0700
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 14:02 -0700
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-05 15:51 -0700
      Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-06 00:32 +0100
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-05 19:45 -0400
    Re: 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@pearwood.info> - 2013-06-06 02:08 +0000
    Re: I just wrote my first Python program a guessing game and it exits with an error I get this. Armando Montes De Oca <armandomontesdeocaiii@gmail.com> - 2013-06-06 07:49 -0700

Page 2 of 2 — ← Prev page 1 [2]


#47161

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-06-06 00:32 +0100
Message-ID<mailman.2771.1370475134.3114.python-list@python.org>
In reply to#47157
On 05/06/2013 23:51, Armando Montes De Oca wrote:
> Well I am sure this will end up a simple solution which is not solved by the geniuses with no sense of humor. Programmers are known for being odd nerds and I just got two of them. Goldstick Jesus what a couple of lazy minded nonsense. Your an ass hole.
>

So that's three people at least within the last couple of weeks who 
could have written "How to win friends and influence people".

-- 
"Steve is going for the pink ball - and for those of you who are 
watching in black and white, the pink is next to the green." Snooker 
commentator 'Whispering' Ted Lowe.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#47162

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-06-05 19:45 -0400
Message-ID<mailman.2773.1370476205.3114.python-list@python.org>
In reply to#47080
On Wed, 5 Jun 2013 07:40:52 -0700 (PDT), Armando Montes De Oca
<armandomontesdeocaiii@gmail.com> declaimed the following in
gmane.comp.python.general:

> Traceback (most recent call last):
>   File "Guessing_Game.py", line 32, in <module>
>     input (enter)
>   File "<string>", line 0
>     ^
> SyntaxError: unexpected EOF while parsing
> ------------------
> (program exited with code: 1)
> This is the only place a string is used:
> else:
> 	print "Sorry you loose the game."

	The word is "lose" ("loose" is when your T-shirt is three sizes too
big)

> 	computernum = str(computernum)
> 	print " The computers number was!"+ computernum
> 	input (enter)

	1)	In Python 2.x this is dangerous, you probably want raw_input (in
3.x, it IS raw_input)
	2)	input is a function that returns data...

		data = input()

	3)	Argument to input is a PROMPT string to be displayed, but you
didn't define "enter".
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#47178

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-06-06 02:08 +0000
Message-ID<51afef05$0$29966$c3e8da3$5496439d@news.astraweb.com>
In reply to#47080
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

[toc] | [prev] | [next] | [standalone]


#47229

FromArmando Montes De Oca <armandomontesdeocaiii@gmail.com>
Date2013-06-06 07:49 -0700
Message-ID<a3959c31-f9d6-426a-9230-79eee80d97ad@googlegroups.com>
In reply to#47080
Yes Steven a C book I am reading has a quote "Every programmer is fluent in swearing" After my blow ups and confusion I am happy with my program anyway. I will get better at it eventually. I did change things to "raw_input" and works fine.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

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


csiph-web