0
304views
Write a python program to implement the Fibonacci sequence for a given input.
1 Answer
written 23 months ago by |
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.
Output: