[Tutor] Simple guessing game - need help with the math

Alan Gauld alan.gauld at btinternet.com
Fri Aug 15 19:12:49 CEST 2014


On 15/08/14 17:49, Derek Jenkins wrote:
> I am a newbie (please correct me if I am wrong), but I happen to think
> that it would be best to suggest that your input be in the same case
> as that of your variables. In other words, it appears that you are
> suggesting the user make an input choice of H, L, or C while the
> program appears to want to handle the variables h, l, or c.

>>>>       answer = input("Is it (H)igher? (L)ower? Or am I (C)orrect? ")
>>>>       answer = answer.lower()

You missed the lower() call in the line above.
So that aspect at least is covered.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list