def fact(n):
    result = 1
    for i in range(1, n + 1):
    	result *= i
    return result

def fact_recursive(n):
    if n == 1:
        result = 1
    else:
        result = n * fact_recursive(n-1)
    return result

Text(fact_recursive(2))

Factorial

by xxthe_drama_llamaxx

Created 7 years, 6 months ago.