Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2023 · Paper 21 · Question 6

9618

As printed in the paper

The question as text

A video-conferencing program supports up to six users. Speech from each user is sampled and digitised (converted from analogue to digital). Digitised values are stored in array Sample. The array Sample consists of 6 rows by 128 columns and is of type integer. Each row contains 128 digitised sound samples from one user. The digitised sound samples from each user are to be processed to produce a single value which will be stored in a 1D array Result of type integer. This process will be implemented by procedure Mix(). A procedure Mix() will: • calculate the average of each of the 6 sound samples in a column • ignore sound sample values of 10 or less • store the average value in the corresponding position in Result • repeat for each column in array Sample The diagram uses example values to illustrate the process: 1 1 2 3 4 5 6 2 3 ... 126 127 128 Sample: Result: 20 20 20 20 20 30 20 20 40 20 20 50 20 3 5 20 4 2 30 30 2 50 30 3 40 40 4 40 50 20 6 60 4 4 70 30 20 20 35 40 46 25 11 Write pseudocode for procedure Mix(). Assume Sample and Result are global. [6]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.