Can you beat the computer? Think of a 4-digit code between 0000 and 9999. Keep it a secret in your head! Press the GREEN FLAG to start. The computer will guess a number. Look at the guess and press these keys on your keyboard to give feedback: • Press [ H ] if your secret code is HIGHER than the guess. • Press [ L ] if your secret code is LOWER than the guess. • Press [ C ] if the computer guessed your code CORRECTLY! Watch the "attempts" counter to see how many tries it takes. The computer will always win in 14 guesses or less!
I was making Password Guesser and wanted to figure out the maximum guesses. Turns out there is a algorithm called Binary Search, so I made a game that uses it. This game uses a famous mathematical algorithm called a "Binary Search." Every time you press H or L, the code automatically calculates the exact middle of the remaining numbers, cutting your options perfectly in half. I didn't code a single block because AI made it for me. Built entirely in Scratch! #games #math #binarysearch #logic #puzzle #algorithm #strategy #codebreaker #numbers #mindgame