A constant is a fixed value that does not change while a program runs; it is the opposite of a variable, whose contents can be modified. It is used to store data that must stay the same from start to finish —such as the number π, the number of days in a week or the name of a game— so it can't be altered by mistake while the program is running.
Constant vs Variable
The difference is simple: a variable is like a labeled box where you can change what you keep inside; a constant is a sealed box that always holds the same thing. In Python, constants are written in uppercase by convention, to tell the programmer “don't change me”:
PI = 3.14
radius = 5
area = PI * radius * radius
Here radius is a variable —it can be 5, 10 or any number in each calculation—, but PI is always 3.14. Scratch has no formal constant, so kids create a variable and simply decide never to change it. Concrete fact: in languages like C++ or JavaScript, trying to modify a constant declared with const causes an immediate error, which helps catch bugs before they grow.
Why It Matters for Kids
Telling constants and variables apart teaches children to organize information and to decide which data should be protected and which can change. It is one of the first concepts practiced in Algonova's coding courses, and it makes more sense after learning what a variable is.
Does your child want to build their first game? Book a free class and let them find out by coding.




