Python program to generate the Febonacci series.

#Program to generate the Febonacci series.
N = input("Enter Number of terms you want to print: ")
N = int(N)

F1 = 0
F2 = 1
i = 3

print(F1)
print(F2)

for i in range(N-2) :
    F3 = F1+F2
    print(F3)
    F1=F2
    F2=F3

Comments

Popular posts from this blog

Python program to calculate age and year when user will be 100 years old

Python program to print numbers less than 5 from the list.