Computer Science · May / June 2026 · Paper 21 · Question 11
0478
As printed in the paper
The question as text
The function ©«Ã¬À£¨| ªÉ®|Ä returns the value of ¬À£¨| raised to the power of ªÉ®|. ¬À£¨| and ªÉ®| are integers. Write pseudocode statements to: • define the function • call the function with the variables { and Í and store the return value in the variable function definition function call [5]
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
One mark for each mark point
Example:
FUNCTION Power(FirstNumber : INTEGER, SecondNumber : INTEGER) RETURNS INTEGER
RETURN FirstNumber ^ SecondNumber
ENDFUNCTION
Function call:
Value ← Power(A, B)
Alternative calculations:
Num ← 1
FOR I ← 1 TO SecondNumber
Num ← Num * FirstNumber
NEXT I
Num ← FirstNumber
FOR I ← 1 TO SecondNumber - 1
Num ← Num * FirstNumber
NEXT I
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

