Exercise path · Python
10 Python exercises, in order
From your first line to a complete program you assembled yourself. Each exercise introduces exactly one new idea, runs in this tab, and tells you in plain language what happened.
How the path works
You never start from a blank editor. Every exercise hands you a program that already runs and asks you to change or add one thing, so the first success is minutes away and the last exercise is a program you can read top to bottom and explain. The ideas arrive in this order: output, variables, arithmetic, conditions, loops, loops and conditions, strings and formatting, lists, putting it together, a complete program.
Run is the check. There is no separate submit button: press Run, and the output is compared with what the exercise asked for. When it is not right, the feedback is a sentence about what happened — the line that differed, or what the error means — rather than a verdict. Hints come one at a time, and the answer opens only after you have run your code at least once, because reading the answer first is how you learn nothing.
Your finished exercises and the code you last had in the editor are saved in this browser, so a half-done exercise is still there tomorrow. Nothing is uploaded and there is no account.
The exercises
- Hello, Out LoudA banner with your own name inside it, printed by code you ran yourself.New idea: print() puts text on the screen
- Name TagA bordered name-tag card with your own name across three of its lines, every one of them fed by a single line of code.New idea: A variable is a reusable name for a value
- Party PlannerA pizza order summary that works itself out from the guest list — slices needed, whole pizzas, and the slices that spill past them.New idea: Python does arithmetic with + - * // and %
- Umbrella or NotA rain report card that reads the forecast for you and signs off with a straight answer — take the umbrella, or leave it at home.New idea: if/else chooses between two different outcomes
- CountdownA launch sequence that counts itself down from five, then prints a liftoff banner and a small rocket.New idea: A for loop with range() repeats an action
- The Clapping GameA count from one to twenty where every third number is replaced by a clap, so the beat is visible straight down the screen.New idea: An if inside a for loop, decided again on every pass
- The ScoreboardA game scoreboard where every name, score and bar lands in the same column, built from one line of text with the values sitting inside it.New idea: f-strings build text with values inside it
- Packing ListA travel packing checklist with a banner, one tick-box line for every item you put on the list, and a footer that counts them for you.New idea: A list holds several values in order, and a for loop walks through them
- Rainfall WeekA seven-day rainfall chart with a row for every day, the week added up underneath it, and the wettest of the seven days picked out.New idea: A variable made before a loop carries a running total from pass to pass
- The Cafe TicketA printed cafe receipt with the shop name at the top, three item rows in straight columns, a subtotal, a service charge the program works out itself, a total, and a thank-you line at the bottom.New idea: Assembling a complete program from parts you already know
After the path
The Python lessons go deeper on every idea the exercises introduced, and the practice problems are the next step up: graded against hidden tests, and a genuine challenge. Everything you can practise Python with on this site is gathered on the Python practice hub. The same path also exists in JavaScript, TypeScript, Java, C++, C, C#, Go, PHP, Ruby, SQL, R and Bash & the Shell.