Program to print n number of fibonacci series
num=input("Enter how many terms of fibonacci series to be printed: ")
a, b = 0, 1
print a
for i in range(1,num+1):
print b
a, b = b, a+b
OUTPUT :
Enter the range upto which the fibonacci series is to be printed : 10
0
1
1
2
3
5
8
13
21
34
55
Enter the range upto which the fibonacci series is to be printed : 11
0
1
1
2
3
5
8
13
21
34
55
89
No comments