Exam-style question
Try this first
Write a Python 3 relational expression that evaluates to True when temperature is greater than or equal to 18. Then state the result when temperature has the value 17.
Model answer
What a good answer should say
- The expression is temperature >= 18.
- When temperature is 17, the expression evaluates to False.
Explanation
Why this works
The >= operator tests both conditions represented by 'greater than or equal to'. Since 17 is not greater than 18 and is not equal to 18, the result is False.
Common mistake
No common mistake is linked to this question yet.
