Basically type the number you want to find in the bar and the Sprite will say if it is there or not. If he finds it he will tell you where it is. Have a look inside if you want. The way it works is it will find the middle then look and see if it possible to be in that half. If not, it checks the other. If it is possibly in there it will continue halving until it gets to the last number. If it is your number it will tell you where it found the number. The halfway is called a midpoint and it will always check if it is the number before it halves. This was a little year 8 project so have fun.
Thanks to my computing teacher Mr Hamilton- one of the best coding teachers ever.