← ACARA Digital Technologies Years 5–6

The data type decides what you can do

The kind of value something is. It decides what you can do with it: calculate with numbers, join text together, or test true and false values.

Understanding The data type decides what you can do in ACARA Digital Technologies Years 5–6

What it does: Adding is an operation for numbers. 10 + 5 gives the number 15. Testing a value gives true or false. 9 > 4 is true, and it is a true/false value. Numbers can be calculated with. Multiplying two names makes no sense because text is not a number. Text (strings) can be joined together. You cannot divide one word by another. True/false values are tested to decide what happens next. A name is text, so you join it rather than test it.

Common mistakes: The quote marks make "12" text, and text cannot be added to the number 8. It should be score = 12 so it stays a number. Here last is a number, so it cannot be joined to the other text values. A surname is text, so it should be last = "Chen".

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
Which value can you sensibly multiply?
7 * 3"Mia" * "Leo"
Matches
"Mia" * "Leo"
↓
You cannot sensibly multiply two names. Multiplying is for numbers, not text. To put names together, join them instead.
Applying
Meanings
Term
data type
Meaning
The kind of value something is. It decides what you can do with it: calculate with numbers, join text together, or test true and false values.
Practice
age ← 10
Testing
Gaps
print(6 7)
Check Answer
Spots
1score = 12
2score = "12"

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

The 'Ostrich' badge — Full Sprint, 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 can you sensibly multiply?
A. 7 * 3 ✓
B. "Mia" * "Leo"
Numbers can be calculated with. Multiplying two names makes no sense because text is not a number.
2. Which operation makes sense for text?
A. Dividing "sun" by "shine"
B. Joining "sun" and "shine" to make "sunshine" ✓
Text (strings) can be joined together. You cannot divide one word by another.
3. What do you get if you join the text "4" and the text "5"?
A. "45" (text) ✓
B. 9 (number)
Joined text stays text. "4" and "5" are characters, so they are stuck together as "45". Adding the numbers 4 + 5 would give 9.
4. What do you get from the sum 4 + 5 when both are numbers?
A. 9 ✓
B. 45
With numbers, + adds them up and gives 9. Getting 45 only happens when 4 and 5 are treated as text and joined.
5. Which type of value can be tested to see if it is true or false?
A. A name, like "Mia"
B. A true/false value, like isRaining ✓
True/false values are tested to decide what happens next. A name is text, so you join it rather than test it.

Match the Pairs

7 * 3 → Multiplies two numbers and gives the number 21, because numbers can be calculated with.
"Sam" + "my" → Joins two pieces of text together to make the text "Sammy".
Numbers can be calculated with, so you can add them to get a total. → 10 + 5
True or false values can be tested, such as checking if one number is bigger than another. → 9 > 4
"Mia" * "Leo" → You cannot sensibly multiply two names. Multiplying is for numbers, not text. To put names together, join them instead.
"5" + "3" gives 8 → Joining text does not add. Because "5" and "3" are text, they join to make the text "53". Use the numbers 5 + 3 to get 8.

Key Term

data type
The kind of value something is. It decides what you can do with it: calculate with numbers, join text together, or test true and false values.

Fill in the Blanks

1. print(6 * 7)
Hint: Type the operator that multiplies two numbers. Numbers can be calculated with.
2. print("Sam" + "Lee")
Hint: Type the operator that joins two pieces of text together.
3. print(9 > 4)
Hint: Type the comparison operator that tests if the left number is bigger. The result is true or false.
4. score = 9 print(score + 1)
Hint: Type the variable name that holds the number, so you can calculate with it.
5. print(type(42))
Hint: Type the built-in function name that tells you the data type of a value.

Spot the Error

Question 1
A score = 12
B score = "12"
C total = score + bonus
D print(total)
Line B — The quote marks make "12" text, and text cannot be added to the number 8. It should be score = 12 so it stays a number.
Question 2
A first = "Mia"
B last = 7
C full = first + " " + last
D print(full)
Line B — Here last is a number, so it cannot be joined to the other text values. A surname is text, so it should be last = "Chen".
Question 3
A is_raining = "True"
B if is_raining:
C print("Take an umbrella")
Line A — With quote marks, "True" is only text, not a true/false value. It should be is_raining = True with no quotes.
Question 4
A age = 11
B older = age > "10"
C print(older)
Line B — You cannot sensibly compare the number 11 with the text "10". The test should compare two numbers: age > 10.
Question 5
A pets = 3
B fish = 4
C total = pets + fish
D print("Pets: " + total)
Line D — The + sign cannot join text to a number. Turn the number into text first with str(total).

Student with a class code? Join your class →