← ACARA Digital Technologies Years 5–6

Sorting values into number, text or true/false

The kind of value you have. Look at what it is: a number to count or calculate with, text in quote marks, or an answer that is only true or false. A postcode is text, not a number.

Understanding Sorting values into number, text or true/false in ACARA Digital Technologies Years 5–6

What it does: An answer that can only be true or false is a true/false value, with no quote marks around it. An age is something you can count and calculate with (like 12 + 1), so it is a number. You never add or subtract house numbers. They are labels, so they are best stored as text. 11 has no quote marks and is a quantity, so its data type is a number.

Common mistakes: A name is text, so it needs quote marks. It should be name = "Mia". Without quotes the computer thinks Mia is something else. An age is a number you can calculate with. Quote marks turn it into text, so age + 1 would not work. It should be age = 11.

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 85–104) 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
What data type is the value 12 (the age of a student)?
NumberText
Matches
isRaining = "True"
↓
The true/false answer was put in quote marks, which turns it into text instead of a true/false value.
Applying
Meanings
Term
data type
Meaning
The kind of value you have. Look at what it is: a number to count or calculate with, text in quote marks, or an answer that is only true or false. A postcode is text, not a number.
Practice
name <- "Mia"
Testing
Gaps
name = "Mia" # type:
Check Answer
Spots
1name = Mia
2age = 11

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

The 'Woodpecker' badge — Tap Tap Tap, 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. What data type is the value 12 (the age of a student)?
A. Text
B. Number ✓
An age is something you can count and calculate with (like 12 + 1), so it is a number.
2. What data type is "Mia" (a person's name)?
A. Text ✓
B. Number
A name is made of letters and goes in quote marks. You can't calculate with a name, so it is text.
3. What data type is the answer to "Is it raining?"
A. Text
B. True or false ✓
The answer is only ever true or false, so it is a true/false value.
4. Which value is text?
A. "Hello" ✓
B. true
Quote marks around characters make text. The word true without quotes is a true/false value, not text.
5. A house number like 42 is used to label a home, not to add up. What data type should it be?
A. Text ✓
B. Number
You never add or subtract house numbers. They are labels, so they are best stored as text.

Match the Pairs

age = 11 → An age is a number, because you can count with it and calculate with it.
name = "Maya" → A name is text, because it is made of letters and sits inside quote marks.
The question "Is it raining?" can only be answered yes or no, so its data type is true/false. → isRaining = True
A postcode like 3000 is a label, not an amount. You never add postcodes, so it is text. → postcode = "3000"
isRaining = "True" → The true/false answer was put in quote marks, which turns it into text instead of a true/false value.
houseNumber = 12 + 4 (to find the average house) → A house number is just a label for a place, so adding house numbers makes no sense. It is better stored as text.

Key Term

data type
The kind of value you have. Look at what it is: a number to count or calculate with, text in quote marks, or an answer that is only true or false. A postcode is text, not a number.

Fill in the Blanks

1. name = "Mia" # type: text
Hint: Type the data type for a name written in quote marks.
2. age = 11 # type: number
Hint: Type the data type for a value you can count or calculate with.
3. raining = True # type: true/false
Hint: Type the data type for an answer that can only be one of two choices: yes or no.
4. postcode = "3000" # type: text
Hint: You never add postcodes together, so type the data type that suits a code written in quote marks.
5. door = "12" # Quote marks mean the value is text
Hint: Type the data type that quote marks show, even when the characters are digits.

Spot the Error

Question 1
A name = Mia
B age = 11
C raining = true
Line A — A name is text, so it needs quote marks. It should be name = "Mia". Without quotes the computer thinks Mia is something else.
Question 2
A postcode = "3000"
B age = "11"
C total = age + 1
Line B — An age is a number you can calculate with. Quote marks turn it into text, so age + 1 would not work. It should be age = 11.
Question 3
A team = "Reds"
B goals = 3
C has_won = "true"
Line C — A true/false answer is written without quote marks. With quotes, "true" is just text. It should be has_won = true.
Question 4
A name = "Zoe"
B age = 12
C raining = false
D postcode = 2000
Line D — A postcode looks like a number, but you never add or count with it. So it is text and needs quote marks. It should be postcode = "2000".
Question 5
A type("Mia") -> text
B type(11) -> text
C type(true) -> true/false
Line B — 11 has no quote marks and you can count with it, so it is a number. It should be type(11) -> number.

Student with a class code? Join your class →