Question: PYTHON Problem 3 (4 points) Represent a polynomial px)- ao +ajx+ az*2 +.+a as a list of coefficients [ao,ar, a2, , an]. Write a function

PYTHON Problem 3 (4 points) Represent a polynomial px)- ao +ajx+ az*2PYTHON

Problem 3 (4 points) Represent a polynomial px)- ao +ajx+ az*2 +.+a as a list of coefficients [ao,ar, a2, , an]. Write a function called poly_eval which takes two input parameters p and c, where p is a Python list of numbers representing a polynomial p) and c is a number, and returns the value p(c In [ ]: # YOUR SOLUTION GOES HERE In "Check that poly_eval returns the correct values." assert poly_eval,1,1],1)3 print("Problem 3 Test 1: Success!" In 1"Check that poly_eval returns the correct values." assert poly-eval(l 1, o , 1 ] , 2 ) -= 5 print ("Problem 3 Test 2: Success!")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!