generate fibonacci series python code example
Example 1: fibonacci series in python
#Recursive Solutions
def fibo(n):
if n<=1: return 1
return fibo(n-1)+fibo(n-2)
fibo(5)
#OUTPUT:
#120
Example 2: code fibonacci python
# Program to display the Fibonacci sequence forever
def fibonacci(i,j):
print(i;fibonacci(j,i+j))
fibonacci(1,1)