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


Groups > comp.lang.python > #43292

Re: guessthenumber print games left

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 <eschneider92@comcast.net>
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 <mailman.403.1365587062.3114.python-list@python.org>
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> <mailman.403.1365587062.3114.python-list@python.org>
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 <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>
Message-ID <mailman.424.1365627722.3114.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Wednesday, April 10, 2013 5:44:20 AM UTC-4, Chris Angelico wrote:
> On Wed, Apr 10, 2013 at 7:39 PM,  <eschneider92@comcast.net> wrote:
> 
> > 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 assistance!
> 
> 
> 
> > numberofgames=1
> 
> > while numberofgames<4:
> 
> >     numberofgames=numberofgames+2
> 
> 
> 
> First off, why are you adding two? Is this a typo?
> 
> 
> 
> You have here a counter, but it's counting up. To figure out how many
> 
> games are left, just subtract the numberofgames from the total number
> 
> of games that you'll be allowing - that's how many there are left. Do
> 
> you know how to do that?
> 
> 
> 
> 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.

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


Thread

guessthenumber print games left eschneider92@comcast.net - 2013-04-10 02:39 -0700
  Re: guessthenumber print games left Chris Angelico <rosuav@gmail.com> - 2013-04-10 19:44 +1000
    Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-10 14:01 -0700
      Re: guessthenumber print games left Chris Angelico <rosuav@gmail.com> - 2013-04-11 08:31 +1000
    Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-10 14:01 -0700
  Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-10 22:34 -0700
  Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-10 22:41 -0700
    Re: guessthenumber print games left Chris Angelico <rosuav@gmail.com> - 2013-04-11 15:48 +1000
  Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-10 22:56 -0700
    Re: guessthenumber print games left Chris Angelico <rosuav@gmail.com> - 2013-04-11 16:02 +1000
  Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-10 23:15 -0700
    Re: guessthenumber print games left Chris Angelico <rosuav@gmail.com> - 2013-04-11 16:27 +1000
  Re: guessthenumber print games left eschneider92@comcast.net - 2013-04-11 00:15 -0700
    Re: guessthenumber print games left Chris Angelico <rosuav@gmail.com> - 2013-04-11 17:27 +1000
    Re: guessthenumber print games left Neil Cerutti <neilc@norwich.edu> - 2013-04-11 12:31 +0000

csiph-web