Project Description: For this project, I created a Scratch game called Guess My Number. In Version 1, the computer chooses a secret number and the player guesses it. In Version 2, the player thinks of a number, and the computer guesses it using the Binary Search Algorithm. The project also counts how many guesses it takes and works with different maximum ranges.
Coding Key:
When Green Flag Clicked: Start All
Strengths:
A strength of my project is that Version 2 uses the Binary Search Algorithm. Instead of guessing randomly, the computer guesses the middle number of the range, then uses the player’s answer to decide whether the number is higher or lower. Each guess cuts the possible range about in half, which makes the program much faster and more efficient than guessing one number at a time. This is especially helpful for large ranges like 1–1,000 or 1–100,000 because the computer can still find the answer in only a small number of guesses.