def factorial(x):
    """This function returns the factorial of a single input/argument."""

    # check if input value is negative or positive
    if x < 0:
        return print("Factorials do not exist for negative numbers.")
    else:
        y = 1
        for i in range(1, x + 1):
            y = y * i
        return y