A boolean is a data type in programming that can hold only two values: true or false. It is named after the mathematician George Boole and is used to answer yes-or-no questions inside a program: did the player win? is the door open? is the number greater than ten? The computer stores that answer as a boolean and uses it to decide what to do next.
How a Boolean Works
A boolean almost always comes from a comparison. When the program evaluates score > 10, the result is not a number: it is either true or false. That value is combined with an if statement to make decisions. In Python a child can write:
if score > 10:
print("You won!")
If the score is 12, the comparison is true and the message appears; if it is 8, it is false and nothing happens. In Scratch the same thing happens with the green hexagon condition blocks, such as touching edge?, which can only be on or off. One fact: in most languages a boolean takes up just a single bit of memory, the smallest unit of information.
Why It Matters for Kids
Booleans teach kids to think in conditions and to break a problem down into clear yes-or-no questions, the foundation of all videogame logic. In Algonova's coding courses kids use booleans to build the rules of their own games, and the concept connects with what a variable is.
You can see it in action in a free trial class, at no cost.



