Past-paper question · 2022 October-November · Paper 22 · Q5(a)

Question 5(a) 2022 · October-November · Paper 22 · 4 marks

Original past-paper question for 5(A)
Original past-paper question for 5(A)
Reveal official mark-scheme answer Official mark-scheme answer for 5(A)

Official answer for Question 5

Part (a)

✓
One mark per mark point, max four

Question 4

✓
•
✓
Line 09 / Higher[HighList] MarksEntry
✓
should be Higher[HighList] Mark
✓
•
✓
Line 15 / MidList MidList
✓
should be MidList MidList + 1
✓
•
✓
Line 17 / Lower[HighList] Mark
✓
should be Lower[LowList] Mark
✓
•
✓
Line 22 / NEXT MarksEntry = 500
✓
should be UNTIL MarksEntry = 500
✓
Corrected algorithm
✓
01 HighList 0
✓
02 MidList 0
✓
03 LowList 0
✓
04 MarksEntry 0
✓
05 REPEAT
✓
06
✓
INPUT Mark
✓
07
✓
IF Mark >= 80
✓
08
✓
THEN
✓
Higher[HighList] Mark
✓
09
✓
HighList HighList + 1

Question 10

Question 11

✓
ELSE

Question 12

✓
IF Mark >= 50

Question 13

✓
THEN
✓
Middle[MidList] Mark

Question 14

✓
MidList MidList + 1

Question 15

✓
Cambridge O Level – Mark Scheme
✓
2210/22
✓
October/November 2022
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Question 16

✓
ELSE

Mark scheme 2210_w22_ms_22.pdf →

Show text version of question

Question 5

Part (a)

Question 5

This pseudocode should allow 500 marks to be entered into the algorithm. If the mark is 80 or

greater it is stored in an array for higher marks. If the mark is less than 80, but greater than or equal to 50 it is stored in an array for middle marks. The remaining marks are stored in an array for lower marks. The results from the algorithm are displayed at the end.

01 HighList 0 02 MidList 0 03 LowList 0 04 MarksEntry 0 05 REPEAT 06 INPUT Mark 07 IF Mark >= 80 08 THEN 09 Higher[HighList] MarksEntry 10 HighList HighList + 1 11 ELSE 12 IF Mark >= 50 13 THEN 14 Middle[MidList] Mark 15 MidList MidList 16 ELSE 17 Lower[HighList] Mark 18 LowList LowList + 1 19 ENDIF 20 ENDIF 21 MarksEntry MarksEntry + 1 22 NEXT MarksEntry = 500 23 OUTPUT "You entered ", HighList, " higher marks" 24 OUTPUT "You entered ", MidList, " middle marks" 25 OUTPUT "You entered ", LowList, " lower marks"

Part (a)

Identify the four errors in the pseudocode and suggest a correction for each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

[4]

Question 9

Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 2210_w22_qp_22.pdf

Keep practising this topic