Note AcademyNote Academy

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

9618

As printed in the paper

The question as text

A procedure Square() will take an integer value in the range 1 to 9 as a parameter and output a number square. The boundary of a number square is made up of the character representing the parameter value. The inside of the number square is made up of the asterisk character (*). 1 Parameter value Output 2 3 4 ... ... 9 1 22 22 33 3* 33 333 44 4* 4 * 4** 444 4444 99 9* 9 * 9** 9 ** 9*** 99 ** 9 * *** 9 ** **** 9* 9*** 9** *** 9 ** **** *** *** ******* 99999999 999999999 The pseudocode OUTPUT command starts each output on a new line. For example, the following three OUTPUT statements would result in the outputs as shown: OUTPUT "Hello" OUTPUT "ginger" OUTPUT "cat" Resulting output: Hello ginger cat 11 Write pseudocode for procedure Square(). Parameter validation is not required. 12 [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.