Question 4(b)(ii) 2024 · May-June · Paper 23 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
(ii)
Question 3
Question 1
Question 2
Question 3
Show text version of question
Question 4
Part (b)
(ii)
Question 4
A procedure TwoParts() will input a sequence of real values, one at a time.
The procedure will:
- process the sequence in two parts
- form a first total by adding the values until the first zero
- form a second total by adding the values after the first zero until the second zero
- output the average of the two totals, together with a suitable message.
Values input in the first part are totalled using global variable TotalA and those input in the second part are totalled using global variable TotalB.
The value zero denotes the split between the two parts of the sequence.
The requirement changes and now there may be up to 20 parts.
(ii)
Describe three benefits of using the data structure given in part (b)(i).
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
3 ........................................................................................................................................
...........................................................................................................................................
Question 10
, ,
Why this question appears here
82% assigned-topic match · Programming › Programming basics
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 9618_s24_qp_23.pdf
