I would like to write a function and input only two parameters: the degree of the function as an integer and the parameters as a list, and be able to evaluate it. The output of the function should be evaluated by using another method.
def func(degree: int, params: list) -> Object
pass
In: f = func( 3, [3, 2, -1, 8] )
In:f
Out: 3*x**3 + 2*x**2 - 1*x + 8
In:f(3)
Out: 104
Currently, I'm doing manually and it's tedious for higher-order function:
def func(t,a,b,c,d):
return a*pow(t,3)+b*pow(t,2)+c*t+d
