Python Variables for Kids
A variable is a name Python remembers a value by, so the same value can be used again without writing it out every time.
- 18 exercises
- 5 lessons
- Ages 10+
- Free
For parents & teachers
What this topic covers
Variables are usually explained as 'boxes that hold things', and that picture is good enough to start with — this topic uses it. What matters more is what children do with them: naming a value, reading it back, and then updating it using its own previous value, which is the step where the box picture starts doing real work.
The line score = score + 10 is where most beginners stall, because it looks like a false statement in mathematics. Read as an instruction rather than an equation, it makes sense immediately, and the topic spends real time on that reading rather than assuming it is obvious.
By the end, a child is holding several variables at once and combining them into printed sentences and stat sheets — the point where variables stop being an exercise and start being useful.
Built around a real misconception
The mistake this topic is built to fix
A child reads score = score + 10 as an equation and objects that it cannot be true.
Why the topic is built around it
In mathematics it would be false. In Python, = means 'work out the right side, then store it under this name'. The topic makes the order of those two steps explicit instead of leaving a child to infer it.
gold = 40gold = gold + 2print("Gold:", gold)
Explain · Ask · Guided · Practice
The lessons, in order
Each lesson explains one idea in short steps, checks it landed with a question, walks through a guided first try, then leaves the child to practise on their own.
Boxes that hold things — and how to look inside them.
- Explain
- Ask
- Guided 1 level
- Practice 3 levels
Boxes can be updated — reading the old value to make the new one.
- Explain
- Ask
- Guided 1 level
- Practice 3 levels
Several boxes at once — sentences, stat sheets, and combined totals.
- Explain
- Ask
- Guided 1 level
- Practice 3 levels
Lesson 4: The Dragon's Full Sheet
Topic challengeEverything you know about boxes, at once.
- Explain
- Ask
- Guided 1 level
- Challenge 2 levels
left, right = right, left swaps two boxes in one line — and why the obvious two-line swap actually fails.
- Explain
- Ask
- Guided 1 level
- Practice 2 levels
Lessons unlock in order within a topic, so nothing arrives before the idea it depends on. This topic is free, start to finish.
Try it now
The very first level needs no account at all — see whether it clicks before signing up for anything.
Play the first level free