Specialty Digest

Global English editionLearners’ Study Dashboard — in development
The Knowledge Library for All

Online Courses / University Track / Computing Foundations

Module 3 · Lesson 1 · Core

Conditions: questions with true or false answers

Write conditions using comparisons and decide whether each is true or false.

  • 55 minutes
  • Serves O3
  • No prior lesson needed

Phase 1: Prepare

Step 1 Warm-up recall

From Module 2: how many patterns can 3 bits hold?

Private: nothing you type here is sent or stored.

Step 2 Learning goal

By the end of this lesson you can:

  • define a condition (Foundation);
  • evaluate a comparison (Core);
  • write a condition from a rule in words (Core).

Phase 2: Teach

Step 3 A familiar example

A door checks your card and answers either “open” or “stay shut”. Behind that single answer is a condition: is this card allowed on this door, true or false?

Step 4 Clear explanation

A condition is a statement about the data that is either true or false. A true or false value is called a Boolean value, named after the mathematician George Boole. Conditions are usually written with a comparison.

TestWrittenResult for 5
Greater than5 > 3true
Greater than or equal5 ≥ 5true
Less than5 < 5false
Equal to5 = 5true
Not equal to5 ≠ 5false
Valueage = 17Comparisonage ≥ 18 ?Resultfalse
A condition is a question with exactly two possible answers, true or false.

The figure shows the flow: take a value, apply a comparison and obtain true or false. With the age 17, the condition age ≥ 18 is false. A method uses that answer to choose its next step. To write a condition from a rule in words, find the quantity (age), the comparison (at least) and the limit (18): “a person must be at least 18” becomes age ≥ 18. The entry on the algorithm explains why each step in a method must be this exact.

Step 5 Worked example (4 marks)

Is the condition score ≥ 50 true or false for the score 49?

  1. Identify the comparison: greater than or equal to. (1 mark)
  2. Substitute the value: 49 ≥ 50. (1 mark)
  3. 49 is less than 50. (1 mark)
  4. The condition is false. (1 mark)

Phase 3: Practise

Step 6 Learner practice (instant-marked)

1. A condition has how many possible answers?

2. Is 5 ≥ 5 true or false?

3. Is 4 > 4 true or false?

4. The rule “at least 18” is written as:

Phase 4: Close

Step 7 Recap

  • A condition is true or false.
  • Compare with >, ≥, <, ≤, = or ≠.
  • “At least” means ≥ and “more than” means >.

Step 8 Exit ticket (ungraded)

Write conditions for “under 5” and “65 or over”.

Private: nothing you type here is sent or stored.

Step 9 Go further (Extension)

Read the entry on the algorithm and note where a decision is needed in a sorting method.

Common mistakes

MistakeWhy it fails
Using > when the rule says at least“At least” includes the limit, so use ≥.
Mixing up < and >Say the condition aloud in words.
Treating a condition as a numberIt is true or false only.

Limits. This lesson uses numbers only; conditions on text or on lists follow the same true-or-false principle.