Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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))
 
PREVIOUS NEXT
Tagged: #python #program #find #fibonacci #series #function #recursion #loop
ADD COMMENT
Topic
Name
8+8 =