Community resourceWorksheet
1CP2-CT-2.5 Boolean operators and compound conditions
Part 5 of 8 · 1CP2-CT-2 · Selection, strings and while loops
The Boolean worksheet, teaching AND, OR and NOT as meanings first and syntax second.
Students will:
- state what AND, OR and NOT each require to be true
- complete a truth table systematically
- translate a requirement into a compound condition
- write a program that acts on a compound condition
- use NOT without accidentally reversing the whole rule
Inside: 8 explanation cells, 2 multiple-choice questions, 2 Python tasks, 2 fill-in-the-blanks cells and 1 written answer. 19 marks, about 45 minutes.
Series: 1CP2-CT-2 · Selection, strings and while loops, part 5 of 8.
Shared by Coding PathwayVerified teacher
- 15 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.
Boolean operators and compound conditions
The logical operators and, or and not combine or reverse Boolean values. Pearson uses uppercase names in theory and truth tables; Python writes them as lowercase keywords.
1. Meanings before syntax
and is true only when both inputs are true. or is true when either or both inputs are true. not reverses one truth value.
True AND False is gap 1. True OR False is gap 2. NOT True is gap 3.- False
- True
2. Complete truth tables systematically
For two inputs, list all four combinations: TT, TF, FT, FF. Work on one operator at a time.
| A | B | A AND B | A OR B |
|---|---|---|---|
| True | True | True | True |
| True | False | False | True |
| False | True | False | True |
| False | False | False | False |
For A = False and B = True, determine (A OR B) AND NOT A. Show the result of each operation.
Evaluate the brackets and NOT before the final AND.
Students type their answer here.
3. Translate requirements into conditions
A value is inside the inclusive range 1 to 10 when both boundaries are satisfied:
number >= 1 and number <= 10
A value is outside that range when either outside condition is true:
number < 1 or number > 10
Choose the operator from the meaning, not from the number of comparisons.
Which condition is true only when age is from 11 through 16 inclusive?
- Aage >= 11 or age <= 16
- Bage > 11 and age < 16
- Cage >= 11 and age <= 16
- Dnot age == 11
4. Use a compound condition
Input integer score. Output Target band when score is from 40 through 59 inclusive; otherwise output Other band.
# Input score and select the required output.
5. Use NOT carefully
not logged_in is true when logged_in is false. NOT can make a condition concise, but a direct comparison may sometimes be clearer. Parentheses make the intended group explicit: not (answer == "yes").
if temperature < 0 gap 1 temperature > 35:
print("Extreme")
if gap 2 logged_in:
print("Sign in required")- and
- not
- or
6. Independent access rule
Input integer age and text has_pass. Permit entry only when age is 12 or above and has_pass equals yes. Output either Entry allowed or Entry refused.
Do not assume that one true condition is enough.
# Input both values and apply the complete access rule.
When is A OR B false?
- AOnly when both inputs are false
- BOnly when both inputs are true
- CWhenever exactly one input is true
- DWhenever A is true
Route forward
You can now construct truth tables and compound selection conditions. Next, condition-controlled repetition re-tests a Boolean condition to decide whether another pass is needed.