Lesson 2 · Python Foundation
Mini project using a loop.
This project uses every single thing you've learned in Python: variables, input, conversion, conditions, loops.
The computer picks a secret number. The player guesses. After each guess they're told higher or lower, until they get it.
And there's a bonus: the smart way to play this game is the halving search from Chapter 2 — the phone book trick. You're about to build the game that proves why it works.
6 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.