Lesson details
Key learning points
- 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?
1
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.
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?
not_validated = False
number = int(input())
print("You must enter a number")
3 Questions
Q1.
What was this symbol used for in pseudocode? <-
Equal to
Less than or equal to
More than or equal to
Q2.
True or False: All pseudocode must follow the same rules.
True
Q3.
True or False: Pseudocode written directly into Python will be interpretted successfully.
True