Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python program to find fibonacci series using function recursion loop

n = int(input())
def fib(n):
    if n == 1 or n == 2:
        return 1
    return (fib(n-1)+fib(n-2))

print(fib(n))
Comment

PREVIOUS NEXT
Code Example
Python :: how to find exact distance 
Python :: python inheritance remove an attribute 
Python :: python date from yy/mm/dd to yy-mm-dd 
Python :: phi 
Python :: django text area limit characters 
Python :: pandas remove rows with null in column 
Python :: pandas extract month year from date 
Python :: python requests get cookies 
Python :: python set label colour 
Python :: pytz timezone list 
Python :: how to make nmap port scanner in python 
Python :: extract n grams from text python 
Python :: how to say hello world 
Python :: how to change number of steps in tensorflow object detection api 
Python :: python insert image 
Python :: python transpose list 
Python :: kivy changing screen in python 
Python :: How to log a python crash? 
Python :: get index of element in numpy array python 
Python :: django not saving images forms 
Python :: wtform custom validator example 
Python :: elon son name 
Python :: how to find largest number in array in python 
Python :: python save .mat 
Python :: python r before string 
Python :: python pandas cumulative return 
Python :: qtextedit get text 
Python :: python get name of tkinter frame 
Python :: remove whitespace in keys from dictionary 
Python :: django password change view 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =