DEV Community 👩‍💻👨‍💻

Nishtha Neeraj Kushwah
Nishtha Neeraj Kushwah

Posted on

How To Print Fibonacci Series In Python

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 😃

Top comments (0)

🌚 Life is too short to browse without dark mode