← ACARA Digital Technologies Years 5–6

Whole numbers as a data type

A number with no fraction or decimal part, like 0, 7 or 250. We use whole numbers to count things, such as scores, lives or students. 3.5 is not a whole number.

Understanding Whole numbers as a data type in ACARA Digital Technologies Years 5–6

What it does: 28 is a count of students with no fraction or decimal part, so it is a whole number. Lives are counted one at a time, so they are whole numbers. Whole numbers are for counting. Names are text, which is a different data type. Zero is a whole number used for counting, and it means there are none left.

Common mistakes: Taking away 0.5 leaves a decimal. Lives are counted, so they stay whole numbers. It should be lives = lives - 1. You cannot have half a student. Counting students uses whole numbers, so the extra + 0.5 should be removed.

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 73–84) and word search (Modules 73–104).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which one is a whole number?
77.5
Matches
lives = 3.5 # whole number
↓
3.5 has a decimal part, so it is not a whole number. Use 3 for lives.
Applying
Meanings
Term
whole number
Meaning
A number with no fraction or decimal part, like 0, 7 or 250. We use whole numbers to count things, such as scores, lives or students. 3.5 is not a whole number.
Practice
score ← 0
Testing
Gaps
print()
Check Answer
Spots
2lives = 3
3lives = lives - 0.5

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

The 'Barreleye Fish' badge — Clear Vision, 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 one is a whole number?
A. 7 ✓
B. 7.5
A whole number has no fraction or decimal part. 7 is whole, but 7.5 has a decimal part.
2. Is 0 a whole number?
A. No, it is not a number
B. Yes, 0 is a whole number ✓
Zero is a whole number. It is what we use when we count nothing, like a score of 0.
3. A class has 24 students. Which data fits best?
A. 24 (a whole number) ✓
B. 24.5 (a decimal)
You can't have half a student, so we count students with whole numbers.
4. Which of these is NOT a whole number?
A. 3.5 ✓
B. 250
3.5 has a decimal part, so it is not a whole number. 250 is a whole number.
5. Your game character has some lives left. Which value makes sense?
A. 2.75 lives
B. 3 lives ✓
Lives are counted one at a time, so they are whole numbers.

Match the Pairs

score = 250 → Stores a whole number, 250, in a variable called score
lives = 0 → Zero is a whole number, so this means the player has no lives left
A whole number counts things like students in a class → students = 28
A number with a decimal part is not a whole number → height = 1.5
lives = 3.5 # whole number → 3.5 has a decimal part, so it is not a whole number. Use 3 for lives.
Zero is not a whole number → Wrong. Zero has no fraction or decimal part, so 0 is a whole number.

Key Term

whole number
A number with no fraction or decimal part, like 0, 7 or 250. We use whole numbers to count things, such as scores, lives or students. 3.5 is not a whole number.

Fill in the Blanks

1. students = 28 print(students)
Hint: Type the variable name that holds the number of students.
2. lives = 0 # no lives left
Hint: Type the whole number that means there is nothing left.
3. score = 10 score = score + 1 print(score)
Hint: Type the operator that adds one point to the score.
4. lives = 3 lives = lives - 1 print(lives)
Hint: Type the operator that takes one life away.
5. score = 250 print(score) # 250 is a whole number
Hint: Type the function name that shows a value on the screen.

Spot the Error

Question 1
A # lives are whole numbers
B lives = 3
C lives = lives - 0.5
D print(lives)
Line C — Taking away 0.5 leaves a decimal. Lives are counted, so they stay whole numbers. It should be lives = lives - 1.
Question 2
A # count the students
B boys = 11
C girls = 13
D total = boys + girls + 0.5
E print(total)
Line D — You cannot have half a student. Counting students uses whole numbers, so the extra + 0.5 should be removed.
Question 3
A score = 0
B points = '250'
C print(score + points)
Line B — Quote marks turn 250 into text. A whole number is typed with no quotes, so it should be points = 250.
Question 4
A # no goals scored yet
B goals = 'zero'
C print(goals)
Line B — Zero is a whole number, so we type the digit 0. The word 'zero' in quotes is text. It should be goals = 0.
Question 5
A cats = 3.5
B dogs = 2
C print(cats + dogs)
Line A — We count cats as whole numbers. 3.5 has a decimal part, so it is not a whole number. It should be cats = 3.

Student with a class code? Join your class →