The search algorithm you used last week is called a binary search algorithm.
It is a really important algorithm to know about.
The key learning slides will teach you more about it.
Then you have some written work to do.
If you need them, here are the programming instructions.
There are some ways you can extend this idea a bit further as well.
There's another way to find a number. This uses a linear search algorithm which is simpler to use.
Linear search algorithm key learning slides
We can code this as well. But, even better, we can code it so that the computer does the guessing.
Here's some Scratch code to implement this:
And here are instructions for how to do this in Python.
> linear search programming instructions
This program will work like a robot and should guess any number using a linear search.
Binary search is based on some interesting maths. It's complex, but you can take a look at the idea here:
Here's the theory: