From f0450b0f96780ba9a1be9eb95378682cde8dde35 Mon Sep 17 00:00:00 2001 From: Swapnanil Dutta <47251193+swapnanildutta@users.noreply.github.com> Date: Fri, 29 May 2020 14:35:35 +0530 Subject: [PATCH] Added Fibonacci Description Added the basic description of Fibonacci Numbers and the main aim of the functions. --- algorithms/dp/fib.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/algorithms/dp/fib.py b/algorithms/dp/fib.py index 6762e90db..7a6fd7140 100644 --- a/algorithms/dp/fib.py +++ b/algorithms/dp/fib.py @@ -1,3 +1,17 @@ +''' +In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, called the Fibonacci sequence, +such that each number is the sum of the two preceding ones, starting from 0 and 1. +That is, + F0=0 , F1=1 +and + Fn= F(n-1) + F(n-2) +The Fibonacci numbers are the numbers in the following integer sequence. + 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……. + +In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation + +Here, given a number n, print n-th Fibonacci Number. +''' def fib_recursive(n): """[summary] Computes the n-th fibonacci number recursive.