recursion_with_factorial

mail@pastecode.io avatar
unknown
plain_text
2 years ago
120 B
0
Indexable
Never

def fact(n):
    if n == 0:
        return 1

    else:
        return n * fact(n-1)


result = fact(5)

print(result)