Lesson details

Key learning points

  1. In this lesson, we will learn how to write our own pseudocode. We will also complete a challenging project that we will need to design using pseudocode before creating in Python.

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.
If the following code was used as a validation check on, how many times could a user enter incorrect data before the program had a runtime error?
An image in a quiz
1
Correct answer: 2
There wouldn't be an error
Q2.
A user is asked to enter a number between 1 and 20. They enter 21. What type of validation error would this cause?
Empty string
It isn't an error because the value is within the specified range.
Correct answer: Out of range
ValueError
Q3.
The following code is used as a validation check to ensure that a whole number is entered. On which line will the loop terminate?
An image in a quiz
not_validated = False
number = int(input())
print("You must enter a number")
Correct answer: while not_validated:

3 Questions

Q1.
What was this symbol used for in pseudocode? <-
Correct answer: Assignment
Equal to
Less than or equal to
More than or equal to
Q2.
True or False: All pseudocode must follow the same rules.
Correct answer: False
True
Q3.
True or False: Pseudocode written directly into Python will be interpretted successfully.
Correct answer: False
True

Lesson appears in

UnitComputing / Programming 3: Iteration

Computing