12 Scratch Project Ideas for Primary School Kids: From Simple Animations to Games

Coding Education

Bayu Nugraha
Children's Coding Specialist

In programming, a variable is a named container that stores data, and the value inside it can change while the program runs. Like a labeled box, you can put a number or text inside, read it back later, or replace it with a new value at any time.
Table of Contents
Every variable has a name and a value. A programmer gives the variable a name and fills it with a value; the computer keeps that value in memory and can read it back whenever it is needed. Imagine a simple game: you create a variable called score and set it to 0 when the game starts. Each time the player collects a coin, the program runs score = score + 1, so the value changes from 0 to 1, 2, 3, and so on. In Scratch you do this with the "change score by 1" block; in Python it is a single line, score = score + 1. The stored value can be a number (a score of 10), text (a player name "Budi"), or a true/false value. The same variable can hold thousands of different values across one game.
Most programming languages sort variables by the kind of data they hold. The common types are numbers, split into whole numbers called integers and decimals; text, stored as a string; and true/false values called booleans. A game score is an integer, a player's name is a string, and "is the game over?" is a boolean. Some languages ask the child to state the type in advance, while beginner-friendly ones like Python and Scratch work it out on their own. Knowing the type matters because it decides what you can do with the value: you can add integers, but adding two strings just joins them.
Understanding variables is the first step in thinking like a programmer: breaking a problem into data that can be stored, read, and changed. The concept appears in almost every programming language, from Scratch to Python, so once a child masters it, they can start building their own games, animations, and apps. In the Algonova coding course, kids learn variables through real projects they can play right away, not by memorizing terms.
Want your child to try building their own score game? Join a free coding class and see how variables work firsthand.
A variable is a named container that stores data, such as a number or text, whose value can change while the program runs. Think of it as a labeled box where the computer keeps information and can read it back at any time.
The most common example is a score in a game. A `score` variable starts at 0 and increases each time the player earns points, so its value keeps changing throughout the game.
The concept is exactly the same, only the way you write it differs. In Scratch a child drags visual blocks to create and change a variable, while in Python they write it as a line of code. Scratch suits beginners; Python is the next step.
Children around 7-8 can grasp variables through Scratch because it is visual and game-based. For Python, kids usually start from age 10 and up.
Blog