Evaluate (5 > 3) AND NOT (2 == 2).
- 5 > 3 is True.
- 2 == 2 is True, so NOT gives False.
- True AND False is False.
Answer False
A-level Computer Science revision · Programming
A Boolean condition evaluates to True or False. Conditions combine comparison operators (==, ≠, <, >, ≤, ≥) with AND, OR and NOT. They control selection (if statements) and iteration (while loops).
Watch out In OCR pseudocode, == tests equality; = assigns a value.
Evaluate (5 > 3) AND NOT (2 == 2).
Answer False
x = 7. What is (x > 5) OR (x < 2)?
Which condition is True when age is 16 or 17 only?
Write a Boolean condition that is True when a mark is outside the range 0 to 100.
Answer mark < 0 OR mark > 100
A-level Computer Science Pro, OCR H446
£119 once
Price rises to £199 on 1 January. Save £80 by joining before then.
At least 12 months of access
No VAT is charged.