
Coding Education
What Is an Integer: The Whole Number Data Type

Bayu Nugraha
Children's Coding Specialist

An integer is a data type in programming that stores whole numbers — numbers with no comma or decimal point, such as 0, 7, -3, or 250. The word "integer" comes from Latin, meaning "whole." Computers use data types to know what kind of value they are storing, and integers are used whenever we need to count something that cannot be a fraction: the number of lives in a game, a player's score, or how many steps a character takes.
Integer vs Other Data Types
Besides integers, there are a few other commonly used data types. Float stores numbers with decimals like 3.14 or 0.5 — good for prices or measurements. String stores text like "Hello" or a player's name. Boolean holds only true or false.
Imagine a child building a game in Scratch: a "score" variable that goes up by 1 each time a star is collected is an integer, because the score is always a whole number. In Python, writing age = 10 creates an integer, while height = 1.4 creates a float. A fun fact: in many programming languages, dividing two integers like 7 // 2 gives 3, not 3.5, because the result is rounded down to a whole number.
Why It Matters for Kids
Understanding integers helps a child think about data types before writing code, a habit that prevents many errors from the start. This concept is closely tied to what a variable is, where an integer is usually stored. Through Algonova's coding course, children learn data types while building real projects at a pace suited to their age.
Want to try it? Invite your child to a free class and build their first number game.

