Question 4(a) 2024 · May-June · Paper 23 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (a)
Question 6
Show text version of question
Question 4
Part (a)
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.
Part (a)
Write pseudocode for the procedure TwoParts().
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 9
, ,
Why this question appears here
72% 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
