← Mission map

Mission 4 of 16

Variables & Data Types

📋 What it is

A variable is a named box that stores a value; data types (number, text, true/false) say what kind it holds.

🗣️ Coach says

A VARIABLE is a labelled box that holds a value your program can use and change — like "score = 0", then later "score = 10". The kind of thing it holds is its DATA TYPE: a number, some text (a "string"), or a true/false ("boolean"). Naming and using variables well keeps code clear.

🧠 Memory hook

A variable = a named box for a value. Its data type says what kind (number/text/true-false).

😂 Giggle

What do you call a computer that sings?
A-Dell!

😲 Whoa!

A "boolean" data type — holding only true or false — is named after mathematician George Boole, who worked out the logic of true/false over 150 years before computers existed.

✅ Quick check: What is a variable in programming?

Say your answer out loud first — then reveal.

🧪 Try it! (2 minutes)

Name three variables for a game (score, playerName, isAlive) and say each one's data type.

⭐ Do the round to earn your star →
🤸 Brain break: Box-it: mime putting a value in a labelled box, then swapping it — a variable changing.