Dear all, This is Dat, I am a newbie in learning Python. My recent attempt is to read and practice the book of Michael Dawson-Python Programming for the Absolute Beginner 3rd Edition. At the end of Chapter 3 there is a challenge of creating "Guess my number" program where the computer guess your number from 1-100.
I have been trying to get it through but stuck while attempting to figure out the loop of how the computer will understand and narrow down the guessing range. After a while, I went on and search on the internet and find out 1 similar program but the coding logic is like: The computer keeps guessing the middle number of the range and narrow down the range by focusing on only the upper/lower part of the range after receving our answer. I somehow have come to believe that the Python language and our logical thinking can do better than that option of choosing the middle number all the time but I still cannot find out the proper answer (probably because I am very much new to this). Could someone provide answer for this program? or some sample code on how to make the computer understand it like human do? Thank you in advance and have a nice day everyone. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor