Examlex

Solved

The Following Fibonacci Function Calculates the Nth Fibonacci Number Recursively

question 3

Multiple Choice

The following fibonacci function calculates the nth Fibonacci number recursively: In [1]: def fibonacci(n) :
) ..: if n in (0, 1) : # base cases
) ..: return n
) ..: else:
) ..: return fibonacci(n - 1) + fibonacci(n - 2)
) ..:
Which of the following statements is false?


Definitions:

Related Questions