Lesson details

Key learning points

  1. In this lesson, we will learn about multi-branch selection and while loops.

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.
When this program is executed, what will be displayed on the screen, if the user enters Python at the prompt?
An image in a quiz
Correct answer: Hello Pythonista
Hello Pythonista, You should try a little Python too
There is an error in the program, because there should not be any quotes around "Python" in line 3.
You should try a little Python too
You should try a little Python too, Hello Pythonista
Q2.
When this program is executed, what will be displayed on the screen, if the user enters Python at the prompt?
An image in a quiz
Hello Pythonista
Hello Pythonista, You should try a little Python too
There is an error in the program, because there should not be any quotes around "Python" in line 3.
Correct answer: You should try a little Python too
You should try a little Python too, Hello Pythonista
Q3.
When this program is executed, what will be displayed on the screen, if the user enters Python at the prompt?
An image in a quiz
Hello Pythonista
Correct answer: There is an error in the program, because there should be quotes around Python in line 3.
You should try a little Python too
You should try a little Python too, Hello Pythonista

3 Questions

Q1.
When this program is executed, what will be displayed on the screen?
An image in a quiz
13, zero
13, zero, 0
Nothing will be displayed on the screen.
Correct answer: There is an error in the program because when line 1 is executed, variable number has not been assigned a value.
Q2.
When this program is executed, what will be displayed on the screen?
An image in a quiz
large
Correct answer: medium
medium, large
small
Q3.
When this program is executed, what will be displayed on the screen?
An image in a quiz
large
medium
Correct answer: medium, large
small