MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / fibonacci

Function fibonacci

dynamic_programming/fastfibonacci.py:13–16  ·  view source on GitHub ↗
(n: int)

Source from the content-addressed store, hash-verified

11
12# returns F(n)
13def fibonacci(n: int): # noqa: E999 This syntax is Python 3 only
14 if n < 0:
15 raise ValueError("Negative arguments are not supported")
16 return _fib(n)[0]
17
18
19# returns (F(n), F(n-1))

Callers 1

fastfibonacci.pyFile · 0.70

Calls 1

_fibFunction · 0.85

Tested by

no test coverage detected