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


Groups > comp.lang.python > #44826

Re: First python program, syntax error in while loop

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'from:addr:yahoo.co.uk': 0.04; 'yet.': 0.04; 'tries': 0.07; 'exercising': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:while': 0.09; 'python': 0.11; 'guess.': 0.16; 'incremented': 0.16; 'key?': 0.16; 'parentheses': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:program': 0.16; 'superfluous': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'code.': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'conjunction': 0.24; 'url:moin': 0.24; 'initial': 0.24; 'regardless': 0.24; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'url:wiki': 0.31; 'initialized': 0.31; 'writes:': 0.31; 'quite': 0.32; 'url:python': 0.33; 'guess': 0.33; 'could': 0.34; "i'll": 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'days': 0.60; 'read': 0.60; 'reaching': 0.61; 'lost': 0.61; 'john': 0.61; "you're": 0.61; 'charset:windows-1252': 0.65; 'enjoy': 0.71; 'subject:First': 0.74; 'game,': 0.84; 'received:2': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: First python program, syntax error in while loop
Date Mon, 06 May 2013 13:37:48 +0100
References <24c5856e-a30a-41bd-aa4a-0e594734e1f8@googlegroups.com> <163bd508-f225-4b4d-8173-1e070c5d5aad@googlegroups.com> <auil2vFijo4U1@mid.individual.net> <km178n$5mn$1@reader1.panix.com> <aupkmcF2mv6U4@mid.individual.net>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host host-2-98-196-142.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
In-Reply-To <aupkmcF2mv6U4@mid.individual.net>
X-Antivirus avast! (VPS 130506-0, 06/05/2013), Outbound message
X-Antivirus-Status Clean
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1360.1367843880.3114.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1367843880 news.xs4all.nl 15889 [2001:888:2000:d::a6]:59579
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44826

Show key headers only | View raw


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?

-- 
If you're using GoogleCrap™ please read this 
http://wiki.python.org/moin/GoogleGroupsPython.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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