Past-paper question · 2023 February-March · Paper 22 · Q2(b)

Question 2(b) 2023 · February-March · Paper 22 · 5 marks

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

Official answer for Question 2

Part (b)

✓
One mark for each point:

Question 5

  • Initialisation of total to zero before loop
  • appropriate loop controls
  • totalling statement inside the loop, must use array Number[] with an index
  • calculation of average outside loop
  • output of average outside loop
✓
Total 0
✓
Example:
✓
FOR Count 1 TO 50
✓
Total Total + Number[Count]
✓
NEXT Count
✓
Average Total / 50
✓
OUTPUT "The average is ", Average
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_m23_ms_22.pdf →

Show text version of question

Question 2

Part (b)

Part (b)

Write an algorithm in pseudocode, using a single loop, to output the average of 50 numbers

that have been stored in the array Number[]

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

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

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

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

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

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

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

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

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

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

[5]
Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Arrays

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

Keep practising this topic