Question 3(a) 2019 · May-June · Paper 21 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
Question 7
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Show text version of question
Question 3
Part (a)
element of the array, Result, contains a REAL value.
The algorithm will output:
- the average value of all the elements
- the number of elements with a value of zero.
The structured English description of the algorithm is:
1. SET Total value to 0 2. SET Zero count to 0 3. SELECT the first element 4. ADD value of element to Total value 5. IF element value is 0 then INCREMENT Zero count 6. REPEAT from step 4 for next element, until element is last element 7. SET Average to Total / 100 8. OUTPUT a suitable message and Average 9. OUTPUT a suitable message and Zero count
Write pseudocode for this algorithm.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 6
Why this question appears here
82% assigned-topic match · Programming › Constructs
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 9608_s19_qp_21.pdf
