fabtab={}
def fabonacci(n):
fabtab[0]=0
fabtab[1]=1
for i in range(2,n+1):
fabtab[i]=fabtab[i-1]+fabtab[i-2]
print(fabtab[i])
return fabtab[n]
num=int(input("Enter the number to generate fabonacci series : "))
print("The fabonacci series are.....")
print(fabonacci(num))
print(fabtab.values())
Showing posts with label Python program to find fabonacci. Show all posts
Showing posts with label Python program to find fabonacci. Show all posts
Tuesday, 28 November 2017
Python Program to find Fabonacci
Subscribe to:
Posts (Atom)
Python Program to find Fabonacci
fabtab={} def fabonacci(n): fabtab[0]=0 fabtab[1]=1 for i in range(2,n+1): fabtab[i]=fabtab[i-1]+fabtab[i-2] ...
-
#include< iostream > #include< conio.h > #include< math.h > using namespace std; int Octal_to_Decimal(long n) { ...
-
#include< iostream > #include< conio.h > #include< math.h > using namespace std; int Octal_to_Binary(long n) { ...
-
#include< iostream > #include< conio.h > #include< math.h > using namespace std; int Decimal_to_Octal(long n) { ...