Write a program to generate Fibonacci series in Python?

,

Aspirant Programmer

Aspirant Programmer

Write a program to generate Fibonacci series in python.

Fibonacci series is a series of numbers in which each number is addition of previous two numbers. So, lets create it with an example

For example: **0 1 1 2 3 5 8 13** and so on.

Lets number of terms is 8.

terms = 8

a=0

b=1

print(a,b,end="")

for n in range(2, terms):

next = a+b

print(next, end="")

a=b

b=next