Lesson details

Key learning points

  1. In this lesson, we will gain a deeper understanding of assignment. We will also explore arithmetic 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.

Loading...

3 Questions

Q1.
Which of these statements is a definition for an algorithm?
Correct answer: A series of instructions that end with the problem solved.
Breaking down a problem into smaller, more manageable chunks.
Spotting patterns in programs.
Q2.
When this program is executed, what will be displayed on the screen?
"I live in", "Leeds"
"I live in", location
Correct answer: I live in Leeds
I live in location
Q3.
When this program is executed, what will be displayed on the screen, as a result of executing line 3?
Correct answer: I’ve never been to followed by whatever the user has typed at the keyboard
I’ve never been to input()
I’ve never been to location
It is not possible to know the output without executing the program.

3 Questions

Q1.
When this program is executed, what will be displayed on the screen?
The Answer is 3 + 13 * 3
Correct answer: The Answer is 42
The Answer is 48
The Answer is answer
Q2.
When this program is executed, what will be displayed on the screen?
13
13 42
Correct answer: 42
There is an error in the program because variable a cannot hold two values at the same time.
Q3.
When this program is executed, what will be displayed on the screen?
13 42
42 13
There is an error in the program because variables a and b are not assigned values in the right order.
Correct answer: There is an error in the program because when line 1 is executed, variables a and b have not been assigned values.

Lesson appears in

UnitComputing / Intro to Python programming

Computing