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 be introduced to a new operator called XOR. We will discover how an XOR works before writing a function to perform the XOR operation.

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.

Loading...

Prior knowledge starter quiz

Download quiz pdf
Share with pupils

5 Questions

Q1.
On which line is the global variable number assigned?
An image in a quiz
1
2
Correct answer: 5
6
Q2.
On which line is the local variable number assigned?
An image in a quiz
1
Correct answer: 2
5
6
Q3.
What value will line 8 output when this program is executed?
An image in a quiz
10
Correct answer: 15
5
There will be no output
Q4.
What will happen when this program is executed?
An image in a quiz
An error message because the global variable number is not defined
Correct answer: An error message because the local variable number is not defined
It will output 10
It will output 5
Q5.
On which line of code does constant declaration occur?
An image in a quiz
1
2
4
Correct answer: 7

4 Questions

Q1.
What will be the output when this program is executed?
An image in a quiz
That is false, That is false
That is false, That is true
That is true, That is false
Correct answer: That is true, That is true
Q2.
Will the following program output True or False?
An image in a quiz
False
Correct answer: True
Q3.
Will the following program output True or False?
An image in a quiz
Correct answer: False
True
Q4.
Will the following program output True or False?
An image in a quiz
False
Correct answer: True