← VCE Data Analysis

Numeric data: integer

A whole number with no decimal part, positive or negative, used for counts such as the number of students in a class (e.g. 25, 0 or -3).

Understanding Numeric data: integer in VCE Data Analysis

What it does: Counts are whole numbers, so an integer data type suits them. You cannot have part of a student. Counts of whole things are integers. An average height needs decimal places, so it is a floating point number. The number of laptops is a count of whole items, so an integer fits. Boolean only stores true or false. Integers can be negative as well as positive, as long as there is no decimal part.

Common mistakes: An integer has no decimal part, and you cannot have half a student. The line should be students ← 28. Goals are counted in whole numbers, so the variable should be declared AS INTEGER. FLOAT is for numbers with decimal places.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 15–24) and word search (Modules 3–24).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which value is an integer?
25.525
Matches
NumStudents (Integer) = 24.5
↓
An integer cannot have a decimal part. A count of students must be a whole number such as 24.
Applying
Meanings
Term
integer
Meaning
A whole number with no decimal part, positive or negative, used for counts such as the number of students in a class (e.g. 25, 0 or -3).
Practice
=COUNTA(A2:A26)
Testing
Gaps
print(isinstance(25, ))
Check Answer
Spots
2DECLARE absent AS INTEGER
3students ← 28.5

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Kangaroo Rat' badge — Speed Typer, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which value is an integer?
A. 25 ✓
B. 25.5
An integer is a whole number with no decimal part. 25 is whole, but 25.5 has a decimal part so it is floating point.
2. Which data is best stored as an integer?
A. The number of students in a class ✓
B. The average height of students in metres
Counts of whole things are integers. An average height needs decimal places, so it is a floating point number.
3. True or false: -3 is an integer.
A. False
B. True ✓
Integers can be positive, negative or zero. -3 is a negative whole number, so it is an integer.
4. Which value is NOT an integer?
A. 0
B. 3.0 (written with a decimal part) ✓
Zero is a whole number, so it is an integer. A value written with a decimal point, like 3.0, is stored as a floating point number.
5. A school records how many laptops it owns. Which data type suits this?
A. Integer ✓
B. Boolean
The number of laptops is a count of whole items, so an integer fits. Boolean only stores true or false.

Match the Pairs

25 → A positive whole number with no decimal part, so it is an integer
-3 → A negative whole number, which is still an integer
A count of students in a class is stored in an integer field → NumStudents (Integer) = 28
Integers can be negative, such as a change in score → ScoreChange (Integer) = -4
NumStudents (Integer) = 24.5 → An integer cannot have a decimal part. A count of students must be a whole number such as 24.
Balance (Integer) = -3 // Error: negatives not allowed → Wrong belief that integers must be positive. Integers can be negative, so -3 is valid.

Key Term

integer
A whole number with no decimal part, positive or negative, used for counts such as the number of students in a class (e.g. 25, 0 or -3).

Fill in the Blanks

1. print(isinstance(25, int))
Hint: Type the Python data type name for a whole number.
2. whole = int(7.9) print(whole)
Hint: Type the function that drops the decimal part and returns a whole number.
3. print(type(25))
Hint: Type the function that shows the data type of a value.
4. num_students = 25 print(num_students + 1)
Hint: Type the variable name that stores the count of students.
5. change = -3 print(type(change))
Hint: Type the symbol that makes this whole number negative.

Spot the Error

Question 1
A DECLARE students AS INTEGER
B DECLARE absent AS INTEGER
C students ← 28.5
D absent ← 3
Line C — An integer has no decimal part, and you cannot have half a student. The line should be students ← 28.
Question 2
A DECLARE goals AS FLOAT
B goals ← 3
C goals ← goals + 1
D DISPLAY goals
Line A — Goals are counted in whole numbers, so the variable should be declared AS INTEGER. FLOAT is for numbers with decimal places.
Question 3
A DECLARE total AS INTEGER
B total ← 1,200
C DISPLAY total
Line B — Integer values are typed without commas or other separators. It should be total ← 1200.
Question 4
A DECLARE tickets AS INTEGER
B tickets ← 0
C tickets ← tickets + 12
D DISPLAY "tickets"
Line D — The quotes make this the text "tickets" instead of the integer stored in the variable. It should be DISPLAY tickets.
Question 5
A Table: Class
B Field: ClassName, Text
C Field: StudentCount, Text
D Field: RoomNumber, Integer
Line C — The number of students is a count, so the field should use the Integer data type, not Text. It should be Field: StudentCount, Integer.

Student with a class code? Join your class →