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
Knowledge point
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