logo

Question detail

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.

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

Question

Type

practice

Style

Topic

Programming

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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.