Computer Science · Oct / Nov 2024 · Paper 1 HL · Question 7
Adapt for 2027Tracing a recursive function is B2.4.5 (HL only); the function should be rewritten in Python or Java instead of IB pseudocode.
IBCS
As printed in the paper
The question as text
7. Consider the following recursive method: rec(A,B) if B=0 then return A else return rec(B,A mod B) end if end rec Determine the value of rec(20,12). Show all your working. [4]
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.

