🔢 Number Guess (Up & Down)

Tries0
Best-

How to Play

The Math Behind It: Binary Search

Number Guess looks simple, but it is a hands-on way to learn a core computer-science algorithm: binary search. If you always call the exact middle of the remaining range, each guess cuts the candidates in half. For the range 1 to 100, going 50 to 75 to 63 and so on guarantees you find any number in at most 7 tries, because 2 to the 7th power is 128, which is greater than 100. By contrast, calling 1, 2, 3 in order could take up to 100 tries with bad luck. Real programs use this same principle to find a value in sorted data. If you beat the game in 7 tries or fewer today, you are already thinking as efficiently as a computer. It is also fun to bet with family or friends over who can do it in fewer tries.

Try another game