Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Lesson details

      Learning outcome

      I can create complex conditions using comparison and logic operators.

      Key learning points

      1. Comparison operators can be used to compare values in expressions.
      2. Logical operators can be used to compare multiple comparison expressions.
      3. Selection statements can combine comparison and logical operators to build complex conditions.

      Keywords

      • Comparison operator - an operator that is used to compare one value to another

      • Condition - an expression that evaluates to True or False

      • Logic operator - an operator used in a logical expression, for example, AND, OR and NOT

      Common misconception

      Selection statements can only check one condition at a time.

      Complex conditions can be built into selection using a combination of comparison and logical operators. Logical operators join separate conditions and provide one complete statement that still evaluates to only True or False.

      Teacher tip

      Programming allows pupils to adapt what they produce to suit their own interests. Once pupils have made the quiz as specified in the slide deck, encourage them to include questions that they would enjoy answering.

      Equipment

      Pupils will need access to a device with block-based programming software. Examples in this lesson use Scratch https://oak.link/scratch

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      Which block is used to carry out selection in Scratch?

      Correct answer: if block
      forever block
      say block
      repeat block

      Q2.
      What can the result of an expression be?

      Correct answer: True or False
      Yes or No
      0 or 1

      Q3.
      Which operator block would you use to check if the value of the score variable is 10?

      Correct Answer: An image in a quiz
      An image in a quiz
      An image in a quiz
      An image in a quiz

      Q4.
      Which of these blocks would you use if you want an operation to happen if the expression evaluates as False?

      Correct Answer: An image in a quiz
      An image in a quiz
      An image in a quiz

      Q5.
      In which block category can you find the if block?

      Correct answer: Control
      Events
      Variables
      Operators

      Q6.
      In which block category can you find this block?

      An image in a quiz
      Correct answer: Operators
      Control
      Events
      Variables
      Q3 image 1 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q3 image 2 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q3 image 3 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q4 image 1 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q4 image 2 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. Q6 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0

      4 Questions

      Q1.
      A operator is used to compare one value to another.

      Correct Answer: comparison

      Q2.
      The logical expression 'AND' returns True when...

      Correct answer: both values are True.
      one or both values are True.
      the value is False.

      Q3.
      The logical expression 'OR' returns True when...

      Correct answer: one or both values are True.
      only one value is True.
      the value is False.

      Q4.
      Logical operators and comparison operators can be combined to build complex .

      Correct Answer: conditions, expressions

      To help you plan your 7 computing lesson on: Operators, download all teaching resources for free and adapt to suit your pupils' needs...