Save
...
OCR Computing
Paper 2
Topic 3: Producing robust programs
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Connor McKeown
Visit profile
Cards (20)
What are the two possible outputs for the given condition in the study material?
"User1" or "Access denied"
View source
What is robust code designed to prevent?
It is
designed
to
prevent
the program from
crashing
due to
unexpected user input.
View source
Why does the pseudocode for calculating an average crash for some inputs?
Because the
algorithm
needs to be
amended
to handle
unexpected
user
inputs.
View source
What is the first input prompt in the pseudocode for calculating an average?
"
Enter score
for
Round 1
:"
View source
What happens if both scores entered are zero in the pseudocode?
The
average
score is printed as
0.
View source
What does the pseudocode print if the scores are not both zero?
It prints the
average score calculated
as \( \
frac
{
x
+
y}{2}
\).
View source
What is the first input prompt in the algorithm for carpeting a room?
"Enter room length:"
View source
What condition is checked regarding the room length in the carpeting algorithm?
If the
room length
is
greater
than
3.5.
View source
What is the consequence if the room length exceeds 3.5 in the carpeting algorithm?
It
prints
"
Carpet not wide
enough."
View source
What is the purpose of the rewritten algorithm for carpeting?
To ensure the
longest
dimension is entered as the
length.
View source
What is the second input prompt in the rewritten carpeting algorithm?
"
Enter room width
:"
View source
What happens if the room width is greater than 3.9 in the rewritten algorithm?
It
prints
"
Carpet not wide
enough."
View source
What should an algorithm do if a student gets an A* in GCSE Maths?
Advise
the student to consider taking
Further Maths
at
A Level.
View source
What should an algorithm do if a student gets an A in GCSE Maths?
Advise
the student to consider
taking Maths
at
A Level.
View source
What should an algorithm do if a student gets a B in GCSE Maths?
Advise
the student to consider taking Maths at
AS
Level.
View source
What should an algorithm advise if a student does not get an A*, A, or B in GCSE Maths?
Advise the student
not
to
continue
with
Maths.
View source
What are the two methods for writing complex selection statements mentioned in the study material?
Case
statement
Nested
if statement
View source
What is the multiplication factor used for calculating the length of carpet required?
02
View source
What is the purpose of checking if the room length is less than the room width in the rewritten algorithm?
To ensure the
longest
dimension is correctly assigned as the
length.
View source
What error is present in the original carpeting algorithm?
The
algorithm
does not check if the
longest
dimension is entered as the
length.
View source