DEV Community

loading...

How To Print Fibonacci Series In Python

Nishtha Neeraj Kushwah
I Love stuff about web dev
・1 min read

What is Fibonacci series ?

Ans. A series of numbers in which each number ( Fibonacci number ) is the sum of the two preceding numbers. The simplest is the series 1, 1, 2, 3, 5, 8, etc.

Explanation Of The Code

The Function fibonacci_seq Take the range as n (n defines how long the series of number is)
Now In the Fibonacci series every Number is the sum of previous two numbers so a and b are the previous number and c is the present number (sum of a and b)

That's all for this post
Thanks For Reading!
Bye 👋
Happy Coding 😃

Discussion (0)