def factorial(num):
    """
    Find the factorial of a number
    
    :type num: integer
    :param num: The number to find the factorial for.
    
    >>> factorial(4)
    24
    """

    if num == 0:
        return 1
    return num * factorial(num - 1)