Python program to print Fibonacci series with the output.

fibonacii number output

Hey, internet mates here we are going to make a python program to generate the Fibonacci series up to given terms. To understand the program code of Fibonacci we first have to understand what is Fibonacci series?

The series in which the next number is found by adding up two numbers before it. The simple mathematical equation to describe it is Xn+2=Xn+1+Xn.

Program code:-
def fibo(z,x,y):
    if x>0:
        d=y+x
        print(d)
        i=d
        y=x
        x=i
        fibo(z-1,x,y)
z=int(input("Enter no:-"))
print(0)
print(1)
print(z-2,1,0)

Output:-

Leave a Comment

Your email address will not be published. Required fields are marked *