Python Tutorial - 2 Ways To Calculate The Fibonacci Sequence

preview_player
Показать описание
Today I will be showing you two python programs that calculate and retrieve the nth Fibonacci number in the sequence. The first way will be using a loop and the second way will be using a recursive function

The Fibonacci numbers are a famous series of numbers where each number is the sum of it's two preceding numbers. The Fibonacci sequence is also very closely related to the golden ratio.

Video timestamps:
0:55 Iterative function using a loop
3:38 Recursive function
Рекомендации по теме