def fact_ad(x, n):
    """
    Returns x(x-1)(x-2)...(x-n+1), the product of n terms, factorial-like operation

            Parameters:
                    x, n: two scalars

            Returns:
                    x(x-1)(x-2)...(x-n+1): scalar

            Example:
            >>> fact_ad(5,4)
            120
    """
    prod = 1
    for i in range(n):
        prod = prod * (x - i)
    return prod