On Wednesday, April 10, 2013 5:44:20 AM UTC-4, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 7:39 PM, <eschneide...@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. -- http://mail.python.org/mailman/listinfo/python-list