Question 1 Report
A class of 10 students has taken a test. Their marks are stored in an array Marks[1:10].
DECLARE Marks : ARRAY[1:10] OF INTEGER
Marks ← {72, 85, 63, 91, 45, 78, 56, 88, 70, 65}(a) Write pseudocode to calculate and output the mean (average) mark. [3]
(a) To find the mean, sum all elements using a FOR loop and divide by the count: [3]
DECLARE Total : INTEGER
DECLARE Mean : REAL
DECLARE i : INTEGER
Total ← 0
FOR i ← 1 TO 10
Total ← Total + Marks[i]
NEXT i
Mean ← Total / 10
OUTPUT "Mean mark: ", MeanThe marks are {72, 85, 63, 91, 45, 78, 56, 88, 70, 65}. Their sum is 72 + 85 + 63 + 91 + 45 + 78 + 56 + 88 + 70 + 65 = 713. The mean is 713 / 10 = 71.3. [1 mark for loop summing, 1 mark for division by 10, 1 mark for output]
Everything you need to excel in your exams