Question 7(b) 2024 · May-June · Paper 22 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 7
Part (b)
Question 3
Question 10
Question 11
Question 12
Question 13
Question 14
Show text version of question
Question 7
Part (b)
Question 7
An algorithm has been written in pseudocode to find and display the maximum and minimum
values in an array of 1000 positive numbers. The array List[] starts at index 1
01 Max List[1] 02 Min List[1] 03 FOR Counter 2 TO 1000 04 IF List[Counter] < Max 05 THEN 06 Max List[Counter] 07 ENDIF 08 IF List[Count] ˂ Min
09 THEN 10 Min List[Counter] 11 ENDWHILE 12 NEXT Counter 13 OUTPUT "Maximum value is ", Max 14 OUTPUT "Minimum value is ", Min
Part (b)
Identify the line numbers of the three errors in the pseudocode and suggest a correction for
each error.
Error 1 line number ...................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 2 line number ...................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 3 line number ...................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Question 7
, ,
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 0478_s24_qp_22.pdf
