def fact(i=0, s=0, h=0):
    """This function calculates the factorial of a number

    Args:
        i (int): Input of the number to be factored
        s (str): If selected "Y", will show the calculation
        h (str): If selected "Y", will show the docstrings of function

    Returns:
        print: Shows the factorial of the number entered (i)
    """
    f = 1
    for c in range(i, 0, -1):
        if s == "Y":
            print(f"{c}", end=" ")
            if c > 1:
                print(f"x", end=" ")
        f *= c 
 
    if s == "Y":
        print(f"» {f}")
    
    if h == "Y":
        return help(fact)
    
    return f"The factorial of {i} is '{f}'"