Unlocking Variables: The Containers That Power Your Code
1 of 4ICT · My World Quest — full scheme of work · pioneer
Unlocking Variables: The Containers That Power Your Code
For grown-ups
Companion summary
Have you ever wondered how a game remembers your score, even as it changes every second? Every app you use — from music players to weather tools — relies on variables to track and update information instantly. Think of a variable as a labelled box: name it "score", put 10 inside, then swap it for 20 whenever you like. When you feel confident, try creating three variables — one for a name, one for an age, one for a favourite colour — and print them all.
The Magic Box Riddle
The Magic Box Riddle
Imagine you have a box with a label on it that says 'score'. Right now, the box holds the number 0. Every time you answer a quiz question correctly, someone opens the box, takes out the old number, and puts in a new one — 1, then 2, then 3. The label never changes, but the contents keep updating. Here is the surprising part: almost every program you have ever used — from a game that tracks your lives to a weather app that shows today's temperature — relies on exactly this idea. That box with a changing value is called a variable.
💭 Think about this
Think of a game or app you use. What information in it might need to change while the program is running? List two examples.
