architect • coder • strategist • musician • educator
Implement a recursive function, factorial
, that takes a number and returns the factorial of that number.
factorial(0) # 1
factorial(1) # 1
factorial(2) # 2 * 1 = 2
factorial(4) # 4 * 3 * 2 * 1 = 24