Question 6(b) 2023 · May-June · Paper 23 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
Question 5
Show text version of question
Question 6
Part (b)
Question 6
An algorithm has been written in pseudocode to allow 100 positive numbers to be input. The total
and the average of the numbers are output. 01 Counter 100 02 Total 0 03 WHILE Counter > 100 DO 04 INPUT Number 05 IF Number > 0 06 THEN 07 Total Total + Counter 08 Counter Counter + 1 09 ENDCASE 10 ENDWHILE 11 OUTPUT "The total value of your numbers is ", Total 12 OUTPUT "The average value of your numbers is ", Total / 100
Question 5
Part (b)
Describe the changes you should make to the corrected algorithm so that a count-controlled
loop is used to allow 100 positive numbers to be input.
You do not need to rewrite the algorithm.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 6
Why this question appears here
98% assigned-topic match · Programming › Programming concepts
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_s23_qp_23.pdf
