Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!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.048 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'that?': 0.05; 'wednesday,': 0.07; 'counting': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'assistance!': 0.16; 'from:addr:comcast.net': 0.16; 'left,': 0.16; 'subject:games': 0.16; 'subtract': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'wed,': 0.18; 'trying': 0.19; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; "i'm": 0.30; 'reply.': 0.31; 'anyone': 0.31; 'figure': 0.32; 'up.': 0.33; 'guess': 0.33; 'totally': 0.33; 'could': 0.34; "can't": 0.35; 'advice': 0.35; 'received:209.85': 0.35; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'thanks': 0.36; 'example,': 0.37; 'received:209': 0.37; 'form,': 0.38; 'solving': 0.38; 'pm,': 0.38; 'how': 0.40; 'number,': 0.60; 'tell': 0.60; 'from:no real name:2**0': 0.61; 'new': 0.61; 'first': 0.61; "you'll": 0.62; 'show': 0.63; 'skip:n 10': 0.64; 'more': 0.64; 'total': 0.65; 'p.s.': 0.66; 'here': 0.66; 'off,': 0.84; 'subject:skip:g 10': 0.84; 'hopes': 0.91; '2013': 0.98 X-Received: by 10.49.72.225 with SMTP id g1mr398886qev.36.1365627713202; Wed, 10 Apr 2013 14:01:53 -0700 (PDT) Newsgroups: comp.lang.python Date: Wed, 10 Apr 2013 14:01:53 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.38.30.68; posting-account=sLfkeQoAAAC9Lnlqp-6c6PVPFjrttJ3I References: <0e8b4a09-3d1d-4b92-a0ef-2274a2a651c9@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 68.38.30.68 MIME-Version: 1.0 Subject: Re: guessthenumber print games left From: eschneider92@comcast.net To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365627722 news.xs4all.nl 2604 [2001:888:2000:d::a6]:36821 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43292 On Wednesday, April 10, 2013 5:44:20 AM UTC-4, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 7:39 PM, wrote: >=20 > > Could anyone tell me how to make the program tell me how many games are= left before the first game and second game? For example, after one game of= guess the number, I want it to tell me that i get one more game. P.S. I'm = totally new to python (obviously), and I just added numberofgames variable = in hopes of solving this problem. am I on the right track? Thanks for any a= ssistance! >=20 >=20 >=20 > > numberofgames=3D1 >=20 > > while numberofgames<4: >=20 > > numberofgames=3Dnumberofgames+2 >=20 >=20 >=20 > First off, why are you adding two? Is this a typo? >=20 >=20 >=20 > You have here a counter, but it's counting up. To figure out how many >=20 > games are left, just subtract the numberofgames from the total number >=20 > of games that you'll be allowing - that's how many there are left. Do >=20 > you know how to do that? >=20 >=20 >=20 > ChrisA Thanks for the quick reply. I've been trying your advice but I can't figure= it out. If anyone could show me how to do it in program form, it would be = much obliged.