What is a Variable?
Imagine a variable as a labelled storage box. You give the box a name (like Score), and you can put any value inside it β a number, some text, or even the result of a calculation. Your Scratch project can peek inside the box at any time, change what's stored, or display the value on the stage.
Real-world analogy
Name
Every variable has a unique name so you can refer to it later (e.g. Score, Lives, PlayerName).
Value
The data stored inside β a number like 0, 100, or -5, or text like 'Alice'.
Changes over time
Unlike a fixed number, a variable's value can be updated as many times as needed while the program runs.
Visible on stage
Scratch can display the variable's current value in a monitor box on the stage so players can see it.
Key vocabulary
- Declare β to create (or "make") a variable for the first time.
- Assign β to put a value into a variable using "Set".
- Increment β to increase a value (usually by 1) using "Change by".
- Read β to use the current value stored in a variable.
Scratch Program Simulator
Build a Scratch script, run it step-by-step, and watch the stage update live!
βοΈ Choose Variable Name
π§© Scratch Block Program
π₯οΈ Scratch Stage

π‘ Interactive Scratch Program
Learning TipClick 'Run Program' to watch Scratch execute every block step-by-step, or use 'Next Step' to step through one block at a time!
π―Mission ChallengeTarget: 20 Coins
Can you edit the Set or Change block values above so that final Score becomes exactly 20?