Gce Model Questions Vol1 2025 Computer Studies Question 44
Practice objective / multiple choice question 44 from the 2025 Gce Model Questions Vol1 Computer Studies examination.
The following Python function is intended to return the nth Fibonacci number using recursion with memoisation: ```python def fib(n, memo={}): if n in memo: return memo[n] if n <= 1: return 1 else: result = fib(n-1) + fib(n-2) memo[n] = result return result print(fib(6)) ``` Identify the logical error in the function and state the correct output that should be printed for `fib(6)` after the error is fixed.
Answer Options
About This Question
This is Gce Model Questions Vol1 2025 Computer Studies Question 44. It is one of the objective questions from the 2025 Gce Model Questions Vol1 Computer Studies examination.
Difficulty level: Hard .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.