19.2 Recursion
47 questions in this subtopic. Open a question to solve it and check the official answer.
Recursion · 3 marks · official answer ready
(i) For each of the three function calls, the main program needs to: • output the value of the two parameters • call the function with those parameters • output the return value. …
Recursion · 2 marks · official answer ready
(ii) Take a screenshot to show the output from part (b)(i). Copy and paste the screenshot into part 1(b)(ii) in the evidence document. [2]
Recursion · 7 marks · official answer ready
(c) Rewrite the function Unknown() as an iterative function, IterativeUnknown(). Save your program. Copy and paste the program code into part 1(c) in the evidence document. [7]
Recursion · 1 mark · official answer ready
(i) For each of the three function calls, the main program needs to: • output the value of the two parameters • call the iterative function with those parameters • output the retu…
Recursion · 1 mark · official answer ready
(ii) Take one or more screenshots to show the output of both functions for each set of parameters. Copy and paste the screenshot(s) into part 1(d)(ii) in the evidence document. [1…
Recursion · 9 marks
4 Take a screenshot to show the output after the given data are entered. Copy and paste the screenshot into part 3(d)(ii) in the evidence document. [1] 11 (e) An in-order tree tra…
Recursion · 8 marks
4 Take a screenshot to show the output after the given data are entered. Copy and paste the screenshot into part 3(d)(ii) in the evidence document. [1] 11 (e) An in-order tree tra…
