guessthenumber print games left
Chris Angelico
rosuav at gmail.com
Thu Apr 11 01:48:12 EDT 2013
On Thu, Apr 11, 2013 at 3:41 PM, <eschneider92 at comcast.net> 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
More information about the Python-list
mailing list