Gce Model Questions Vol1 2022 Computer Studies Question 43

Practice objective / multiple choice question 43 from the 2022 Gce Model Questions Vol1 Computer Studies examination.

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

Consider the following Python function: ```python def ways(n, memo={}): if n in memo: return memo[n] if n == 0: return 1 if n < 0: return 0 memo[n] = ways(n-1, memo) + ways(n-2, memo) return memo[n] print(ways(6)) ``` What integer value is printed when the program is executed?

Answer Options

A. 12
B. 14
C. 21
Correct Answer D. 13
Correct Answer
D
Correct Option:
13

About This Question

This is Gce Model Questions Vol1 2022 Computer Studies Question 43. It is one of the objective questions from the 2022 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