Future careers in the AI era: what to prepare now

Coding Education

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.
Table of Contents
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.
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.
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.
An integer stores whole numbers with no decimals, like 5 or -20, while a float stores numbers with a decimal point, like 3.14. Use integers for counting and floats for values that need fractions.
The number of students in a class, age in years, a game score, and the number of books on a shelf are all integers because they are always whole numbers with no fractions.
Yes. Integers include zero, positive numbers, and negative numbers such as -3 or -100, as long as they have no decimal part.
The concept of an integer is very basic and easy to grasp. Children usually pick it up naturally while making games or counting scores, even before they know the technical term.