Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'reject': 0.05; 'exit': 0.07; 'matches': 0.07; 'subject:code': 0.07; 'python': 0.09; 'incorrect': 0.09; 'integers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'language': 0.14; 'library': 0.15; '"guess': 0.16; '(last': 0.16; 'denote': 0.16; 'finney': 0.16; 'guess.': 0.16; 'input.': 0.16; 'integer.': 0.16; 'looping': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'integer': 0.17; 'typing': 0.17; 'math': 0.20; 'equivalent': 0.20; "user's": 0.22; "i'd": 0.22; 'programming': 0.23; 'user.': 0.23; 'random': 0.24; 'least': 0.25; 'guess': 0.27; 'then.': 0.27; 'header:X-Complaints-To:1': 0.28; 'indentation': 0.29; 'leaves': 0.29; 'trigger': 0.29; 'case,': 0.29; '(including': 0.30; 'classes': 0.30; 'normally': 0.30; 'asking': 0.32; 'print': 0.32; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'languages': 0.33; 'tutorial': 0.33; 'another': 0.33; 'ben': 0.35; 'especially': 0.35; 'so,': 0.35; 'something': 0.35; 'received:org': 0.36; '2005': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'display': 0.36; 'enough': 0.36; 'subject:: ': 0.38; 'fact': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'range': 0.60; 'map': 0.61; 'between': 0.63; 'times': 0.63; '10.': 0.64; 'total': 0.65; 'jul': 0.65; 'score': 0.75; '100': 0.78; '"what': 0.84; '800': 0.84; 'inclusive': 0.84; 'newcomer': 0.84; 'norm': 0.84; "they'd": 0.84; 'dennis': 0.91; 'browse': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: code review Date: Sun, 01 Jul 2012 13:41:20 -0400 Organization: > Bestiaria Support Staff < References: <2662370.TGmo96CKe1@PointedEars.de> <87wr2oecf6.fsf@dpt-info.u-strasbg.fr> <4FEF7117.7000109@jollybox.de> <87bok0qr62.fsf@benfinney.id.au> <87395cq6sr.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-107-91.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1341164486 news.xs4all.nl 6938 [2001:888:2000:d::a6]:58641 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24745 On Sun, 01 Jul 2012 17:28:20 +1000, Ben Finney declaimed the following in gmane.comp.python.general: > So, languages without strong typing then. In that case, I revise my > statement: I know of no programming language with strong typing that > would give a newcomer to Python the above expectation. > I'd think a true newcomer (to programming) would have NO expectations... And if they'd had any complex math classes may actually consider if 1 < x < 10: to be the norm (though it should be less-than-or-equal to map to the normally inclusive endpoints in "pick a number between 1 and 10") -=-=-=- Assignment: Conditionals and Looping The program shall play "Guess the Number" with the user. The program shall generate an random integer between 1 and 10 (including 1 and 10 in the range). The program shall loop asking the user for a guess. The program shall reject non-integer input. The program shall reject integers outside the range of 1 to 10. The program shall maintain a score (count) of incorrect guesses. The program shall display the score and exit when the user's guess matches the randomly generated integer. -=-=-=- In contrast to this total neophyte, someone transferring from another language should have enough experience to at least browse the language reference and tutorial -- especially after encountering the simple fact that Python requires indentation to denote blocks! Something not seen in any other language and which should trigger the thought "what else is different?" At least the Python reference is only around 100 pages (last time I printed it) in contrast to the 800 page Ada 2005 (okay, the appendices should be counted as equivalent to the Python standard library reference; that still leaves over three times as many pages for Ada reference, and the print is much finer) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/