Comparing values gives true or false

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

This Comparing values gives true or false worksheet is part of the ACARA Digital Technologies Years 5–6 — Representing Data with Numbers journey. Print it as a booklet?

Comparing values gives true or false

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does 7 > 3 give?
A true
B false
2. What does 2 > 9 give?
A false
B true
3. Which comparison gives true?
A 10 < 4
B 4 < 10
4. A comparison like 8 < 5 gives which kind of answer?
A A true or false answer
B A new number
5. What does 6 = 6 check?
A Whether the first is bigger
B Whether the two values are equal

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
17 > 3 AAsks if 2 is less than 9. The answer is true.
22 < 9 BFive is not less than two, so 5 < 2 is false. The greater than symbol > would make it true.
3A comparison with equal to gives false when the two values are different. C4 = 6
4A program can use a true answer to decide to do something. Dif score > 10 then show "Pass"
55 < 2 is true EAsks if 7 is greater than 3. The answer is true.
68 > 8 is true FEight is not greater than eight because the two values are equal. The comparison gives false.

Definitions

7 > 3

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
7 _ 3 is true
2.
2 _ 9 is true
3.
5 _ 5 is true
4.
__ score > 10 then show "You win" end if
5.
4 > 9 is _____

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A score ← 7
B big ← score < 3
C PRINT big
D // prints true
Question 2
A a ← 4
B b ← 9
C PRINT a < b
D // shows false
Question 3
A IF 9 < 6 THEN
B PRINT "9 is bigger"
C END IF
Question 4
A score ← 50
B pass ← score > 40
C IF pass THEN
D PRINT "Try again"
E END IF
Question 5
A pets ← 3
B friends ← 3
C same ← pets > friends
D PRINT same

Answer Key

Comparing values gives true or false
Section A: Quick Questions
Q1
A — true
Q2
A — false
Q3
B — 4 < 10
Q4
A — A true or false answer
Q5
B — Whether the two values are equal
Section B: Match the Pairs
Q1
7 > 3 → Asks if 7 is greater than 3. The answer is true.
Q2
2 < 9 → Asks if 2 is less than 9. The answer is true.
Q3
A comparison with equal to gives false when the two values are different. → 4 = 6
Q4
A program can use a true answer to decide to do something. → if score > 10 then show "Pass"
Q5
5 < 2 is true → Five is not less than two, so 5 < 2 is false. The greater than symbol > would make it true.
Q6
8 > 8 is true → Eight is not greater than eight because the two values are equal. The comparison gives false.
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
7 > 3 is true
Q2
2 < 9 is true
Q3
5 = 5 is true
Q4
if score > 10 then show "You win" end if
Q5
4 > 9 is false
Section E: Spot the Error
Q1
B — 7 < 3 is false, but the program is meant to print true. The comparison should be score > 3, because 7 > 3 is true.
Q2
D — 4 is less than 9, so a < b gives true, not false. The comment should say shows true.
Q3
A — 9 < 6 is false, so the message would never print. The comparison should be 9 > 6, which is true.
Q4
D — 50 > 40 is true, so pass is true and the IF block runs. It should print You pass, not Try again.
Q5
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.