Page 1: Guess My Number
Unit 5, Lab 1, Page 1
In this lab, you will use two different algorithms to search a list, and you will learn that algorithms are categorized by the time required to run them.
On this page, you will modify your number guessing game from Unit 2 to make the computer do the guessing.
-
Click the picture to load a version of the number guessing game in which you guess a number from 1 to 60.
- Play a few times. Keep track of how many guesses it takes you to identify the number each time.
- Develop a strategy that will identify the secret number in no more than 6 guesses.
- Write down your strategy clearly enough for others to use it to play the game.
- Then compare your algorithm with another pair of students.
-
Now make the computer guess your number using this strategy.
There are three sprites with costumes (“too small,”just right,” and “too big”) that are hidden in your project file. Use the
show
block in the “Looks” menu to see them.See an example of what this looks like:
- Save your work.
You built a number guessing game in Unit 2, Lab 2: Developing a Number Guessing Game with Script Variables.