 def factorial(x):
    if x:
        return x * factorial(x -1)
    return 1