Choosing a data type for a value
Ask what you will do with the value: calculate with it (number), join or show it (text), or answer yes/no (true/false). A phone number is text because you never add it.
Understanding Choosing a data type for a value in ACARA Digital Technologies Years 5–6
What it does: Quote marks show this is text. You show or join a phone number but you never do sums with it. Adding is a calculation, so the score must be a number. You add to a score, so it is a whole number. Numbers are the type you calculate with. Has finished? is a yes/no question, so true or false is the right type. Names are joined and displayed, so they are text. Numbers are for calculating. Adding is a calculation, and only numbers can be calculated with. The word because gives the reason for your choice. isCorrect is answered with yes or no, so true or false fits. The score would be a different value.
Common mistakes: A score is a whole number because we calculate with it. Adding the text "bonus" to a number is an error. It should be total = score + bonus. A phone number is text because we never add it, and a number would lose its leading 0. It should be phone = "0412345678" in quotes.
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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
choose a data typeFill in the Blanks
Spot the Error
Student with a class code? Join your class →