Write a function that generates fibbonacci series


Topic: Write a function that generates fibbonacci series

Solution

def Fibonacci(n:int)-> int:
    if n==1:
        fibonacci = 0
    elif n==2:
        fibonacci = 1
    else:
        fibonacci = Fibonacci(n-1) + Fibonacci(n-2)
    return fibonacci



List all Python Programs