MCPcopy Create free account
hub / github.com/geekcomputers/Python / fib

Function fib

Fibonacci_sequence_recursive_sol.py:1–5  ·  view source on GitHub ↗
(term)

Source from the content-addressed store, hash-verified

1def fib(term):
2 if term <= 1:
3 return term
4 else:
5 return fib(term - 1) + fib(term - 2)
6
7
8# Change this value to adjust the number of terms in the sequence.

Calls

no outgoing calls

Tested by

no test coverage detected