Header_blog

Coding Education

4 min read

What Is an Integer: The Whole Number Data Type

Published: 10.07.2026·Updated: 22.07.2026
Bayu Nugraha

Bayu Nugraha

Children's Coding Specialist

What Is an Integer: The Whole Number Data Type

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.

Table of Contents

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.

What Int and Integers Mean

Integer, integers, and int all point to the same thing: a whole number. "Integers" is simply the plural form, while "int" is the short form used when writing code. In Python, for example, int converts a value into a whole number, so int("7") gives the number 7. Some values that count as integers: 0, 25, -8, and 1000. Values that are not integers: 3.5 or 0.75, because they have digits after the decimal point. A child can try this idea for themselves in a free Algonova coding class.

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.