Question 5(b) 2023 · October-November · Paper 23 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (b)
Question 6
Show text version of question
Question 5
Part (b)
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 (b)
Complete this flowchart for the corrected algorithm:
START
STOP
Question 8
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
