
Coding Education
What Is a Boolean: True/False Values in Programming

Bayu Nugraha
Children's Coding Specialist

A boolean is a data type in programming that can hold only two values: true (true) or false (false). It is named after the mathematician George Boole, and it forms the basis of every decision a computer makes. Whenever a program asks "is this true?", the answer is always a boolean.
How Booleans Work
A boolean appears every time a program compares something.
Computers use booleans to choose what to do next. A comparison like "is the score greater than 10?" produces either true or false, and the program then uses that result inside an if block.
Here is an example from a simple game. In Python we write if score > 10: then print("You win!"). If score is 15, then score > 10 is true and the message "You win!" appears. If the score is 8, the result is false and nothing is printed.
In Scratch, kids use the green hexagon-shaped blocks (such as > 10) that snap into an "if...then" block. Those hexagon blocks always produce a boolean.
Fun fact: no matter the programming language, there are only two boolean values — there is no "maybe". This is why computers run on binary (0 and 1), exactly like false and true.
Why It Matters for Kids
Booleans teach children to think logically by breaking a decision into clear yes-or-no questions. This skill is useful far beyond coding — it helps with everyday problem-solving too. In Algonova's coding course, kids learn to use booleans through game projects and interactive stories, then continue by understanding what a variable is.
Want your child to try it? Sign them up for a free coding class to build their first game.

