Program - factorial of number using recursion


Topic: Program - factorial of number using recursion

Solution

def factorial(n: int):
    if n<1:
        return 1
    else:
        return n * factorial(n-1)



List all Python Programs