Future careers in the AI era: what to prepare now

Coding Education

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.
Table of Contents
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.
A boolean data type holds only two values, true (true) or false (false), with nothing in between. In code the word is often shortened to "bool", but it means the same thing. A boolean value always comes out of a comparison. For example, 5 > 3 gives true, while 2 > 8 gives false. In a game, the question "is the player out of lives?" can only be answered yes or no. So the answer to "what is a bool" or "give a boolean example" always comes back to these two simple values. A child can try making true-or-false decisions in a project during a free Algonova coding class.
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.
A boolean is a data type that has only two values: true or false. Computers use it to make decisions inside a program.
The boolean values are true and false. They come from comparisons, for example "5 > 3" gives true, while "2 > 8" gives false.
A number can hold many values (1, 2, 100, and so on), while a boolean has only two: true or false. Booleans are used specifically for logic and decisions.
Children aged 7 and up can grasp booleans through Scratch, because the true/false idea is easy to understand with colorful visual blocks.