Lesson 8: While loop and binary search