DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Alex Pushkarev
Alex Pushkarev

Posted on

Tutorial: Nth Fibonacci number in Python

In this short video tutorial we will create a recursive algorithm for calculating Nth number of the Fibonacci series.

❓ What is The Fibonacci sequence?
πŸ‘‰πŸ»The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers. The first two numbers in the Fibonacci sequence are 0 and 1, and the sequence goes on from there.

❓ How to calculate Nth number of Fibonacci sequence in Python?
πŸ‘‰πŸ»Calculating a value of an Nth number of the Fibonacci sequence is one of the fundamental recursive problems. In this video I will show step-by-step tutorial for writing a solution for this problem in Python using test-driven development.

This is one of the most simple way to implement Nth Fibonacci number algorithm in Python and it isn't the most effective one.

Can you guess what would be time complexity for it? Feel free to write your gueeses in comments!

Top comments (0)

Classic DEV Post:

Understanding git through images