def _factor(value):
    """
    regulations 0! = 1

    >>> _factor(5)
    120
    >>> _factor(2)
    2
    """
    f = 1
    if value:
        for i in range(value):
            f = f * (i + 1)
    else:
        f = 1

    return f