# Write the psudocode for a program where the player and the computer ># trade places in the number guessing game. That is, the player picks a ># random number between 1 and 100 that the computer has to guess. ># Before you start, think about how you guess. If all goes well, try ># coding the game. > > >It builds on the previous challenge, where the user guesses the number - I >coded that OK, as below.OK, So which bits of this challenge puzzle you?
Can you write down the process you used when guessing the numbers? Can you turn that description into pseudo-Python code? Hint: You need to get the computer to generate numbers in an ever narrowing range, Maybe the midpoint number? (You could also google "binary chop" to get more ideas) Then you need to tell the computer which direction it should go next. Have a stab at it, get back to us with what you've come up with. HTH Alan G.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor