AI or coding first: which should your child learn?

Coding Education

Hafiz Rahman
Lead Coding Instructor at Algonova Malaysia

A variable in programming is a named container that stores a piece of data — like a number, a word, or a true/false value — so a program can use it and change it later. The name is a label you choose; the value is what sits inside, and it can vary while the program runs — that is exactly why it is called a "variable". This is the programming meaning, not the statistics one.
Table of Contents
Think of a variable as a labelled box. You write a name on the box (score), drop something inside (0), and the computer remembers it. Later you can look inside, swap the contents, or do maths with them.
In Scratch, a child makes a variable called score and sets it to 0. Each time the player catches a star, a change score by 1 block runs, so the same box now holds 1, then 2, then 3 — the name stays the same while the value changes.
In Python, the same idea is just two lines: score = 0 creates the variable and stores 0, then score = score + 1 reads the current value, adds one, and saves the result back under the same name. Variables commonly hold numbers (10), text called strings ("Amir"), and true/false values called booleans.
Variables are one of the first big ideas in coding — almost every game, quiz or app tracks something (a score, a name, a level) in a variable. Getting comfortable with them early makes the jump from drag-and-drop blocks to real text code far smoother, a core step in Algonova's coding classes for kids. For a gentle starting point, see what coding is for kids.
The meaning of a variable in coding is a named store whose value can change while a program runs. "Variable in programming" and "variable in coding" describe the same thing: a label you pick, holding a value you can read or update at any point. This is why the word is so central; the value varies, but the name you use to find it stays the same.
Curious to see it click? Book a free trial class and watch your child build their very first score counter.
It is a named box that stores a value — a number, word or true/false — so the program can use it and change it later. The name stays fixed while the value can vary as the code runs.
A game score. You create a variable called score, start it at 0, and add 1 every time the player wins a point. In Python that is score = 0 then score = score + 1.
Not quite. In maths a variable like x is an unknown to solve for. In programming a variable is a storage box you set and update on purpose. This page means the programming one.
Around 7–8 in Scratch, where variables are colourful blocks, and about 10+ in text languages like Python. Kids meet them in their very first real projects.
Start your child's tech journey
Book your free 60-minute trial class with an Algonova certified tutor. No payment, no obligation, just discover what your child can build.