Python Program for n-th Fibonacci number

 21 - Feb - 2022
 XpertPhp
 29

In this article, We will explain to you python program for n-th Fibonacci number. so you can see our python example. Example

def Fibonacci(n):
    if n<= 0:
        print("Incorrect input")
    elif n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return Fibonacci(n-1)+Fibonacci(n-2) 
print(Fibonacci(10))
Output
34