Community resourceWorksheet
1CP2-CT-2.3 Simple selection and relational operators
Part 3 of 8 · 1CP2-CT-2 · Selection, strings and while loops
The first selection worksheet, covering the six relational operators and the shape of a one-way and two-way decision.
Students will:
- use each of the six relational operators correctly
- tell the code inside a decision apart from the code after it
- write a condition that includes its boundary value
- write one-way and two-way selection of their own
- choose test data either side of a boundary
Inside: 7 explanation cells, 3 multiple-choice questions, 2 Python tasks, 2 fill-in-the-blanks cells and 2 written answers. 20 marks, about 45 minutes.
Series: 1CP2-CT-2 · Selection, strings and while loops, part 3 of 8.
Shared by Coding PathwayVerified teacher
- 16 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Simple selection and relational operators
Selection lets an algorithm choose whether to execute a block. A relational expression compares two values and produces True or False.
1. Six relational operators
| Meaning | Python | Example |
|---|---|---|
| equal to | == | score == 10 |
| not equal to | != | answer != "yes" |
| less/greater than | < / > | age > 12 |
| less/greater than or equal | <= / >= | mark >= 40 |
Do not confuse assignment = with equality comparison ==.
score gap 1 50 tests at least 50. choice gap 2 "quit" tests not equal. attempts gap 3 3 tests equal.- =
- ==
- !=
- >
- >=
2. A decision has labelled outcomes
The diamond contains a question. Each outgoing arrow is labelled with its outcome. In Python, the condition follows if and ends with a colon. Indented statements belong to the selected block.
Read this listing without executing it:
age = 14
if age >= 13:
print("Teen ticket")
print("Booking complete")
Which option gives the exact output order?
- A`Booking complete` only
- B`Teen ticket`, then `Booking complete`
- C`Teen ticket` only
- D`Booking complete`, then `Teen ticket`
Explain why Booking complete is displayed whether the condition is true or false.
Use indentation and block membership.
Students type their answer here.
A discount applies at age 16 and above. Which condition includes the boundary value 16?
- Aage > 16
- Bage == 15
- Cage >= 16
- Dage != 16
3. Write a one-way decision
Input an integer temperature. If it is below 3, output Frost warning. Do not output an alternative message. The program will be tested on both sides of the boundary.
# Input temperature and display the warning when required.
4. Two-way selection
Add else when exactly one of two routes must run. else has no condition: it means the preceding if condition was false.
if points >= 100:
print("Level up")
else:
print("Keep going")
Complete the structure.
if balance gap 1 cost:
print("Purchase allowed")
gap 2:
print("Insufficient balance")- <
- >=
- else
- if
- while
5. Independent two-way decision
Input integer speed. Output Within limit when speed is 30 or below; otherwise output Over limit. Test data include 30 because boundary values expose incorrect < or >= choices.
# Input speed and output exactly one required message.
Explain why testing speeds 30 and 31 is more useful than testing 20 and 25.
Link the chosen values to the decision boundary.
Students type their answer here.
What does a relational expression produce?
- AA Boolean value
- BA new variable name
- CA loop count
- DA string position
Route forward
You can now construct one-way and two-way selection. Next you will handle three or more mutually exclusive outcomes and make decision code readable.