- #1

fisico30

- 374

- 0

I just learned about the "guess the number" game. There are 100 numbers, from 1 to 100 and the computer must ask questions to find the correct number.

The computer could start from 1 and go up until it finds the right number. That would involve a certain number of questions.

Or the computer could ask more intelligent questions, like "is the number smaller or larger than 50", etc....

Most of the codes I have seen don't ask that "is the number smaller or larger than 50?" but simply ask some binary questions that are all similar (is this number smaller or larger than the previously guessed number? etc....)

Why?

thanks

fisico30