← ACARA Digital Technologies Years 5–6

Comparing values gives true or false

A comparison. Symbols like > (greater than), < (less than) and = (equal to) compare two values and give true or false. 7 > 3 is true, so a program can use it to decide.

Understanding Comparing values gives true or false in ACARA Digital Technologies Years 5–6

What it does: Four is not equal to six, so the comparison gives false. The symbol > means greater than. 7 is greater than 3, so the answer is true. Comparing two values always gives true or false. Here 8 is not less than 5, so it gives false. The equal sign in a comparison asks if both values are the same. 6 and 6 are the same, so it is true. A program uses true or false to decide what to do next. False just means that choice is not taken.

Common mistakes: 7 < 3 is false, but the program is meant to print true. The comparison should be score > 3, because 7 > 3 is true. 4 is less than 9, so a < b gives true, not false. The comment should say shows true.

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 does 7 > 3 give?
truefalse
Matches
5 < 2 is true
↓
Five is not less than two, so 5 < 2 is false. The greater than symbol > would make it true.
Applying
Meanings
Term
7 > 3
Meaning
A comparison. Symbols like > (greater than), < (less than) and = (equal to) compare two values and give true or false. 7 > 3 is true, so a program can use it to decide.
Practice
console.log(7 > 3);
Testing
Gaps
7 3 is true
Check Answer
Spots
1score ← 7
2big ← score < 3

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

The 'Elephant' badge — OOP Heavyweight, 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 does 7 > 3 give?
A. true ✓
B. false
The symbol > means greater than. 7 is greater than 3, so the answer is true.
2. What does 2 > 9 give?
A. false ✓
B. true
2 is not greater than 9, so the comparison gives false.
3. Which comparison gives true?
A. 10 < 4
B. 4 < 10 ✓
The symbol < means less than. 4 is less than 10, but 10 is not less than 4.
4. A comparison like 8 < 5 gives which kind of answer?
A. A true or false answer ✓
B. A new number
Comparing two values always gives true or false. Here 8 is not less than 5, so it gives false.
5. What does 6 = 6 check?
A. Whether the first is bigger
B. Whether the two values are equal ✓
The equal sign in a comparison asks if both values are the same. 6 and 6 are the same, so it is true.

Match the Pairs

7 > 3 → Asks if 7 is greater than 3. The answer is true.
2 < 9 → Asks if 2 is less than 9. The answer is true.
A comparison with equal to gives false when the two values are different. → 4 = 6
A program can use a true answer to decide to do something. → if score > 10 then show "Pass"
5 < 2 is true → Five is not less than two, so 5 < 2 is false. The greater than symbol > would make it true.
8 > 8 is true → Eight is not greater than eight because the two values are equal. The comparison gives false.

Key Term

7 > 3
A comparison. Symbols like > (greater than), < (less than) and = (equal to) compare two values and give true or false. 7 > 3 is true, so a program can use it to decide.

Fill in the Blanks

1. 7 > 3 is true
Hint: Type the symbol that means greater than.
2. 2 < 9 is true
Hint: Type the symbol that means less than.
3. 5 = 5 is true
Hint: Type the symbol that means equal to.
4. if score > 10 then show "You win" end if
Hint: Type the keyword that starts a decision using the true or false answer.
5. 4 > 9 is false
Hint: Type the true or false answer to this comparison. 4 is not bigger than 9.

Spot the Error

Question 1
A score ← 7
B big ← score < 3
C PRINT big
D // prints true
Line B — 7 < 3 is false, but the program is meant to print true. The comparison should be score > 3, because 7 > 3 is true.
Question 2
A a ← 4
B b ← 9
C PRINT a < b
D // shows false
Line D — 4 is less than 9, so a < b gives true, not false. The comment should say shows true.
Question 3
A IF 9 < 6 THEN
B PRINT "9 is bigger"
C END IF
Line A — 9 < 6 is false, so the message would never print. The comparison should be 9 > 6, which is true.
Question 4
A score ← 50
B pass ← score > 40
C IF pass THEN
D PRINT "Try again"
E END IF
Line D — 50 > 40 is true, so pass is true and the IF block runs. It should print You pass, not Try again.
Question 5
A pets ← 3
B friends ← 3
C same ← pets > friends
D PRINT same
Line C — The variable is called same, so it should check if the two values are equal using =. Using > checks greater than, and 3 > 3 is false.

Student with a class code? Join your class →