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.

Gce Model Questions Vol1 2025 Computer Studies Objective / Multiple Choice Hard Difficulty
Question 44 GCE_MODEL_QUESTIONS_VOL1 • 2025 • COMPUTER_STUDIES • objective

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

Correct Answer A. 8
B. 13
C. 5
D. 7
Correct Answer
A
Correct Option:
8

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.

Unlock Full Access Available for Android & Windows
Chat with Support