Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ fibonacci
Function
fibonacci
example_code/item_038.py:66–70 ·
view source on GitHub ↗
Return the n-th Fibonacci number
(n)
Source
from the content-addressed store, hash-verified
64
print(
"Example 2"
)
65
@trace
66
def
fibonacci(n):
67
""
"Return the n-th Fibonacci number"
""
68
if
n in (0, 1):
69
return
n
70
return
fibonacci(n - 2) + fibonacci(n - 1)
71
72
73
print(
"Example 3"
)
Callers
1
item_038.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected