Algorithms
Mathematics
Numbers

Return the factorial of a given input number.

Note that the number must be equal or greater than 1.

i.e.:

factorial(6) = 720
factorial(5) = 120
def factorial(x):
    return 1 if x == 1 else x*factorial(x-1)