Number Guessing Game

We’re going to make a game in Week 4, Part 1. We will call this game the number-guessing game—this game is played with 2 people, we’ll call them Person A and Person B. The goal is for Person A to guess the secret number that only Person B knows.

Person A

Person B

Person A will pick the highest number that Person B can pick (Person B picks a number from 1 to the highest number).
Person B will pick a number from 1 to the highest number that Person A chose. This will be the secret number.
Person A will try to guess the secret number.
Person B will tell Person A if their guess is correct.
If Person A’s guess was not correct, Person B will tell Person A if their guess was too high or if their guess was too low.
Person A will keep guessing until they guess the secret number. The goal is to guess the secret number in the fewest guesses possible.

In class “Person B” will be played by the computer!

X
X