Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2023 · Paper 23 · Question 4

9618

As printed in the paper

The question as text

A function MakeString() will: 1. take two parameters: • a count as an integer • a character 2. generate a string of length equal to the count, made up of the character 3. return the string generated, or return "ERROR" if the count is less than 1. For example, the function call: MakeString(3, 'Z') will return the string "ZZZ" Write pseudocode for function MakeString(). [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.