Past-paper question · 2023 October-November · Paper 23 · Q5(a)

Question 5(a) 2023 · October-November · Paper 23 · 3 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 for each error identified and correction given

Question 3

  • Line 06 Password should be NewPassword
  • Line 11 AND should be OR
  • Line 16 INPUT should be OUTPUT
✓
Cambridge O Level – Mark Scheme
✓
2210/23
✓
October/November 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 2210_w23_ms_23.pdf →

Show text version of question

Question 5

Part (a)

Question 5

An algorithm has been written in pseudocode to check if a new password is in a list of previously

used passwords OldList[] If the password is not found, the new password will be stored at the end of the list to replace "XXXX" already stored there.

01 OUTPUT "Enter your new password " 02 INPUT NewPassword 03 Posn 1 04 Found FALSE 05 REPEAT 06 IF Password = OldList[Posn] 07 THEN 08 Found TRUE 09 ELSE Posn Posn + 1 10 ENDIF 11 UNTIL Found AND OldList[Posn] = "XXXX" 12 IF Found 13 THEN 14 OUTPUT "Password has been used before" 15 ELSE 16 INPUT "New password accepted" 17 OldList[Posn] NewPassword 18 ENDIF

Part (a)

Identify the three errors in the pseudocode and suggest corrections.

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

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

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

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

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

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

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

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

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

[3]

Question 7

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_w23_qp_23.pdf

Keep practising this topic