Fibonacci Series in Python : An Example of a Recursive Function

The Fibonacci series is a popular example of a recursive function, i.e. a function which calls itself.

A fibonacci series term is equal to the sum of the two preceding terms before it.

def fibonacci(f, l, n):
t = f + l
if(t < n):print(t)return fibonacci(l, t, n)else:return t
n =int(input("Enter the upper limit of the series : "))
fibonacci(0,1, n)