Computer Science · Oct / Nov 2023 · Paper 1 HL · Question 9
Adapt for 2027Tracing a simple recursive method is B2.4.5 (HL only); rewrite the IB pseudocode in Python or Java.
IBCS
As printed in the paper
The question as text
9. Consider the following recursive method: fun(N) if N > 0 then return (N mod 10) + fun(N div 10) else return 0 end if end fun
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
9(a)[4]
9(b)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

