Write a python program to generate Fibonacci series.

Given below python program to generate Fibonacci series.

Fibonacci series – The sum of previous two elements define the next element.

>>> x,y = 0,1
>>> while x < 25:
print(y)
x,y = y, x+y

1
1
2
3
5
8
13
21
34

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.