What Is a Variable?
A variable is a named box that stores a value — a number or text — that can change while the program runs.
Creating a Variable in Scratch
- Click Variables in the Block Palette.
- Click “Make a Variable”.
- Type a name (e.g., Score) and click OK.
Scratch automatically creates three blocks: set Score to (0), change Score by (1), and a Score reporter block you can snap into other blocks.