Function to find the product term
def proterm ( i , value , x ) : NEW_LINE INDENT pro = 1 ; NEW_LINE for j in range ( i ) : NEW_LINE INDENT pro = pro * ( value - x [ j ] ) ; NEW_LINE DEDENT return pro ; NEW_LINE DEDENT