Past-paper question · 2023 May-June · Paper 23 · Q6(b)

Question 6(b) 2023 · May-June · Paper 23 · 5 marks

Original past-paper question for 6(B)
Original past-paper question for 6(B)
Original past-paper question for 6(B)
Reveal official mark-scheme answer Official mark-scheme answer for 6(B)

Official answer for Question 6

Part (b)

✓
One mark per mark point, max five

Question 5

✓
MP1 replace line 03
✓
MP2 with FOR
✓
MP3 … with limits 0 to 99 / 1 to 100
✓
MP4 replace line 05 to check if Number is not positive
✓
MP5 … (if Number is not positive) insert a validation and re-input routine between lines 06 and 07 …
✓
MP6 … that will repeat until a positive value is entered
✓
MP7 remove the counter update / line 08
✓
MP8 replace line 10 / ENDWHILE with NEXT
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s23_ms_23.pdf →

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.

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

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

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

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

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

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

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

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

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

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

[5]

Question 6

Topic relevance

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

Keep practising this topic