icon-background-square
New
New
Year 7

Operators

I can create complex conditions using comparison and logic operators.

icon-background-square
New
New
Year 7

Operators

I can create complex conditions using comparison and logic operators.

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

Lesson details

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 - used to control the path a program follows

  • 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.

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.
speech-bubble
Teacher tip
equipment-required

Equipment

All pupils require access to devices that have or can access the online version of Scratch. Starter programs are linked to the lesson and can be remixed as required.

copyright

Licence

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

Lesson video

Loading...

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 Foundation under CC BY-SA 2.0 Q3 image 2 Scratch Foundation under CC BY-SA 2.0 Q3 image 3 Scratch Foundation under CC BY-SA 2.0 Q4 image 1 Scratch Foundation under CC BY-SA 2.0 Q4 image 2 Scratch Foundation under CC BY-SA 2.0 Q6 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