AI or coding first: which should your child learn?

Coding Education

Hafiz Rahman
Lead Coding Instructor at Algonova Malaysia

An integer is a whole-number data type — a number with no decimal point and no fractional part, such as -4, 0, 7 or 300. In programming, an integer (often shortened to int) can be positive, negative or zero, but it never carries anything after a decimal point. The number 8 is an integer; 8.5 is not.
Table of Contents
Every value in a program has a data type that tells the computer how to store and use it. An integer holds whole numbers (10), a float holds numbers with decimals (3.14), and a string holds text ("Aisyah"). Picking the right type matters: you count lives in a game with an integer, but measure temperature with a float.
In Scratch, when a child sets a score variable to 0 and clicks change score by 1, the score climbs 1, 2, 3 — always whole numbers, so it behaves like an integer. In Python, lives = 3 stores the integer 3, while price = 2.50 stores a float. A concrete fact: most languages give integers their own type because whole-number maths is faster and exact, with no rounding errors.
Integers are one of the first data types children meet, and telling them apart from decimals and text is a core idea in KSSR computing and wider STEM learning. Understanding types early helps kids avoid bugs and write clearer code in Algonova coding classes. Integers are usually stored inside a variable, so the two ideas go hand in hand.
In coding, int is simply the short name for an integer, so "what is an int" and "what is an integer" ask the same thing. An integer number is any whole number with no decimal point, like 5, 0, or -20. Programmers reach for an integer when they need to count something exactly, such as lives, points, or the number of players.
Curious to see it in action? Book a free trial class and watch your child code with their first numbers.
An integer is any whole number — like 0, 5, 42 or -7 — with no decimal point or fraction. It can be positive, negative or zero.
The number of lives in a game. If a player has 3 lives, that 3 is an integer. In Python you would write lives = 3. A score that goes 1, 2, 3 is also made of integers.
An integer is a whole number with no decimal, like 7. A float has a decimal point, like 7.5. Use an integer to count things and a float to measure things.
Around 7–8 in Scratch, where scores and counts are whole numbers, and about 10+ in text languages like Python where int is a named type. Kids meet integers in their first projects.
Start your child's tech journey
Book your free 60-minute trial class with an Algonova certified tutor. No payment, no obligation, just discover what your child can build.