Login or Create an Account to view the mark scheme, comment, and add to a test
function f(N) if (N = 0) then return 0 else return N + f(N - 1) end if end function
(a).
With respect to the recursive function above called with N=6, complete the trace table below.
[3]
N | f(N) returns ----------------- 6 | 5 | 4 | 3 | 2 | 1 | 0 |
(b).
State the final output when N=7.
[1]

Extended Response4 MarksPremium
40 Uses46 Views1 Like