MCPcopy Create free account
hub / github.com/BeeBombshell/Python-DSA / fib

Function fib

Recursion/Fibonacci_Series.py:1–7  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

1def fib(n):
2 if n == 0:
3 return 0
4 elif n == 1:
5 return 1
6 else:
7 return fib(n-1) + fib(n-2)
8num = int(input("Enter no. of terms of fibonacci series: "))
9print("Fibonacci series of",num,"terms :-")
10for i in range(1,num+1):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected