Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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*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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started