Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!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.098 X-Spam-Evidence: '*H*': 0.81; '*S*': 0.00; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:games': 0.16; 'two,': 0.16; 'unnecessary.': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'seems': 0.21; 'print': 0.22; 'possibly': 0.26; 'post': 0.26; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'figure': 0.32; "can't": 0.35; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'how': 0.40; "you're": 0.61; 'skip:n 10': 0.64; 'close': 0.67; 'subject:skip:g 10': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=1PKvutdUt1sUrOcezcndx/xFIcEVvlZoBiGRfL7kHJU=; b=E2giaBxJlBWlHm/z3SSuuZGb3hlKEU/NdR1vr7GGJo1s4vQwbtFClAUYnw+PU8+vOi EIbZQUtWUZimeJnl00VN27hJuwzXKzzZDaTQnhfbck8W2x+3a0/42+IamDZtcsaqtozA K0Xq95zeeu4AlUg5epDzGGq759SmvMLqunTdaCaKab2HSNufTx1KkuTGIHoJfdy5/qy6 r6B3F6YGQFvzEfuVrLuJXpzE69AzwtY8bQy7mkCJJphfJKUTKjzOxyjf0ceJ/+/SaEaF XuPmCil15M5MUjAWDpdADl+D5p3CXfDYWyaYYlEAHN38EWjZ0oKx8x6pmzxLmGWTkOXo IfAA== MIME-Version: 1.0 X-Received: by 10.220.103.7 with SMTP id i7mr3976507vco.7.1365659292753; Wed, 10 Apr 2013 22:48:12 -0700 (PDT) In-Reply-To: <2177e45e-2f1d-45f0-8970-5dda0220922a@googlegroups.com> References: <0e8b4a09-3d1d-4b92-a0ef-2274a2a651c9@googlegroups.com> <2177e45e-2f1d-45f0-8970-5dda0220922a@googlegroups.com> Date: Thu, 11 Apr 2013 15:48:12 +1000 Subject: Re: guessthenumber print games left From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365659300 news.xs4all.nl 2683 [2001:888:2000:d::a6]:44571 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43319 On Thu, Apr 11, 2013 at 3:41 PM, wrote: > (Didn't mean to post the last bit.) Is this possibly what you meant? If it is I still can't figure out how to apply it to the guessthenumber program. > numberofgames=1 > while numberofgames<4: > numberofgames=numberofgames+2 > print (4-numberofgames) > if numberofguesses>3: > print(numberofgames) That's close to it. I still don't understand why you're adding two, and the last print seems to be unnecessary. But if you just add one, then yes, that would be exactly what you want. ChrisA