Help with guessing game :D

rurpy at yahoo.com rurpy at yahoo.com
Tue Oct 29 17:25:34 EDT 2013


On Tuesday, October 29, 2013 2:21:08 PM UTC-6, Robert Gonda wrote:
> Is it possible to further more specify it? H only shows if the
> guess is at most 3 higher then the answer?. But L is only given
> if the guess is at most 3 lower the answer? I'm starting to
> like this ;D

To do that, you'll need to convert the string digits back to
numbers that you can do arithmetic on.  The int() function
can do that.  Then you can do something like

 if guess_num > number_num + 3: ... print what you want here.

You'll find you get more and better answers to your questions 
if you attempt to do something yourself and when you find it is 
not doing what you want, post here saying what you tried, what 
it did, and how what it did is different from what you want.

You'll also get better responses if you edit out the empty
and excess ">" lines in the quoted text of your replies,
which you are still not doing.



More information about the Python-list mailing list