Nobody learns to write by writing alone — you read first, and plenty. Programming works the same way. Each page below is one complete, working Python program, printed in full for you to read before you write anything of your own. Reading real code is how programmers actually learn, and the curriculum says so too.
The routine never changes. Predict: work out what the program will do, line by line, before running it. Run: type it in and grade your own prediction. Extend: every page ends with three “make it yours” ideas, and the smallest is a single-line change.
Roughly in reading order:
- Mad Libs — your words, poured into a silly story
- Guess My Number — a while loop plays the guessing game
- The Dice Roller — loops, randomness, and a first taste of data
- The Password Checker — nested decisions, toy rules only
- The Chatbot — keyword matching wearing a conversation costume
- The Text Adventure — every piece above, in one small game
Need Python working first? Setting Up Python has you covered. And when a “make it yours” idea outgrows its page, that is not a problem — that is The Remix Project starting early.