Can someone lend me a hand with problem set 2 question 1? I just don't know where to start..
This? "Implement the evaluate_poly function. This function evaluates a polynomial function for the given x value. It takes in a tuple of numbers poly and a number x. By number, we mean that x and each element of poly is a float. evaluate_poly takes the polynomial represented by poly and computes its value at x. It returns this value as a float." It is basically making a type of calculator.
Think of each term in the polynomial, poly, separately. They are each made up of a coefficient (the float value) multiplied times the variable x(the argument) to the power of a number(the float's index). Each term need to be calculated and then added to the sum.
Join our real-time social learning platform and learn together with your friends!