Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44827
| From | Neil Cerutti <neilc@norwich.edu> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: First python program, syntax error in while loop |
| Date | 2013-05-06 13:07 +0000 |
| Organization | Norwich University |
| Message-ID | <aupo88F2mv6U5@mid.individual.net> (permalink) |
| References | (1 earlier) <163bd508-f225-4b4d-8173-1e070c5d5aad@googlegroups.com> <auil2vFijo4U1@mid.individual.net> <km178n$5mn$1@reader1.panix.com> <aupkmcF2mv6U4@mid.individual.net> <mailman.1360.1367843880.3114.python-list@python.org> |
On 2013-05-06, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > On 06/05/2013 13:06, Neil Cerutti wrote: >> On 2013-05-03, John Gordon <gordon@panix.com> wrote: >>> In <auil2vFijo4U1@mid.individual.net> Neil Cerutti <neilc@norwich.edu> writes: >>> >>>> Not quite yet. Players who guess correctly on the fifth try don't >>>> get credit. >>> >>> Are you sure? tries is initialized to zero and isn't >>> incremented for the initial guess. >> >> while (number != guess) and (tries < 5): >> >> Is the condition that concludes the game. >> >> After the game, you are told you lost if tries is not less than >> five, regardless of if number == guess. > > One of these days I'll work out why some people insist on using > superfluous parentheses in Python code. Could it be that they > enjoy exercising their fingers by reaching for the shift key in > conjunction with the 9 or 0 key? Superflous parenthesis are sometimes a nice aid to comprehension. I don't know about the above case, though. I don't think it hurts anything, but it doesn't add much. -- Neil Cerutti
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
First python program, syntax error in while loop ryankoch38@gmail.com - 2013-05-03 10:18 -0700
Re: First python program, syntax error in while loop John Gordon <gordon@panix.com> - 2013-05-03 17:27 +0000
Re: First python program, syntax error in while loop Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-05-03 19:26 +0200
Re: First python program, syntax error in while loop John Gordon <gordon@panix.com> - 2013-05-03 17:37 +0000
Re: First python program, syntax error in while loop MRAB <python@mrabarnett.plus.com> - 2013-05-03 18:36 +0100
Re: First python program, syntax error in while loop Zachary Ware <zachary.ware+pylist@gmail.com> - 2013-05-03 12:37 -0500
Re: First python program, syntax error in while loop ryankoch38@gmail.com - 2013-05-03 10:57 -0700
Re: First python program, syntax error in while loop John Gordon <gordon@panix.com> - 2013-05-03 18:21 +0000
Re: First python program, syntax error in while loop ryankoch38@gmail.com - 2013-05-03 11:34 -0700
Re: First python program, syntax error in while loop ryankoch38@gmail.com - 2013-05-03 12:52 -0700
Re: First python program, syntax error in while loop John Gordon <gordon@panix.com> - 2013-05-03 20:04 +0000
Re: First python program, syntax error in while loop ryankoch38@gmail.com - 2013-05-03 13:15 -0700
Re: First python program, syntax error in while loop Neil Cerutti <neilc@norwich.edu> - 2013-05-03 20:30 +0000
Re: First python program, syntax error in while loop John Gordon <gordon@panix.com> - 2013-05-03 20:38 +0000
Re: First python program, syntax error in while loop Neil Cerutti <neilc@norwich.edu> - 2013-05-06 12:06 +0000
Re: First python program, syntax error in while loop Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-06 13:37 +0100
Re: First python program, syntax error in while loop Neil Cerutti <neilc@norwich.edu> - 2013-05-06 13:07 +0000
Re: First python program, syntax error in while loop Roy Smith <roy@panix.com> - 2013-05-06 09:08 -0400
Re: First python program, syntax error in while loop rusi <rustompmody@gmail.com> - 2013-05-06 06:36 -0700
Re: First python program, syntax error in while loop Chris Angelico <rosuav@gmail.com> - 2013-05-06 23:37 +1000
Re: First python program, syntax error in while loop roy@panix.com (Roy Smith) - 2013-05-06 11:31 -0400
Re: First python program, syntax error in while loop Terry Jan Reedy <tjreedy@udel.edu> - 2013-05-06 16:11 -0400
Re: First python program, syntax error in while loop Chris Angelico <rosuav@gmail.com> - 2013-05-07 07:50 +1000
Re: First python program, syntax error in while loop Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-06 20:16 -0400
Re: First python program, syntax error in while loop alex23 <wuwei23@gmail.com> - 2013-05-06 17:17 -0700
Re: First python program, syntax error in while loop Roy Smith <roy@panix.com> - 2013-05-06 20:18 -0400
Re: First python program, syntax error in while loop Dan Sommers <dan@tombstonezero.net> - 2013-05-07 05:03 +0000
Re: First python program, syntax error in while loop Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-07 07:10 +0100
Re: First python program, syntax error in while loop Chris Angelico <rosuav@gmail.com> - 2013-05-07 19:19 +1000
csiph-web