Year 11

Logical expressions

Link copied to clipboard

Year 11

Logical expressions

Link copied to clipboard

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.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. In this lesson, we will deepen our understanding of logical expressions by introducing the operators AND and OR. It will begin with a Parson's Problem to check our understanding of selection. It will then move on to an unplugged activity that introduces AND and OR. We will walk through code, and investigate it before writing our own logical expressions.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

2 Questions

Q1.
If you want to increase the value held in the score variable by 1, which line of code should you use?
score + 1
score = 1
score = 1 + 1
Correct answer: score = score + 1
Q2.
What does this logical operator represent? !=
Equal to
Less that or equal to
More than or equal to
Correct answer: Not equal to

3 Questions

Q1.
If the user enters the colour: red and the suit: spades. What will the output be of this program?
An image in a quiz
My card is a match
Correct answer: My card is not a match
Q2.
If the user enters the colour: black and the suit: hearts. What will the output be of this program?
An image in a quiz
Correct answer: My card is a match
My card is not a match
Q3.
If the user enters the colour: black and the suit: diamonds. What will the output be of this program?
An image in a quiz
My card is a match
Correct answer: My card is not a match
This site uses cookies to store information on your computer. Some of these cookies are essential, while others help us to improve your experience by providing insights into how the site is being used.