0
328views
Write a python program to implement the Fibonacci sequence for a given input.
1 Answer
0
2views

Solution:

A Fibonacci sequence is the integer sequence of 0, 1, 1, 2, 3, 5, 8… The first two terms are 0 and 1. All other terms are obtained by adding the preceding two terms. This means to say the nth term is the sum of (n-1) and (n-2) the term.

enter image description here

Output:

enter image description here

Please log in to add an answer.