You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to learnpython
Hey Everyone,
I was just thinking about the Guessing Game from Chapter 1, and wanted to implement a more optimal strategy for making guesses to get to the secret answer (rather than just guessing randomly higher and lower). Here's a little program in python that I've been toying with to do that (special thanks to Chapters 2 & 3 and Chad). It essentially figures out what the best guess should be, and spits it back into the game to get to the right answer. It gets it between 6 and 8 tries, depending on how close the initial guess is.