def factorial(n):
    """return n factorial    

    The factorial is defined as n! = n*(n-1)!
    Note: The recursive factoial implementation will break down if n is too large
    """
    if(n==0):
        return 1
    else:
        return n*factorial(n-1)