Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python 3 Jupyter notebook. Please check if all tests pass Represent a polynomial p(x)=a0+a1x++adxd as a list of numbers [a0,a1,, ad] . Write a function
Python 3 Jupyter notebook. Please check if all tests pass
Represent a polynomial p(x)=a0+a1x++adxd as a list of numbers [a0,a1,, ad] . Write a function called poly_integral which takes a list p representing a polynomial p(x)=a0+a1x++adxd, and numbers a and b, and returns the value of definite integral abp(x)dx \# YOUR CODE HERE "Check if poly_diff accepts 3 input parameters. (1 mark)" poly_integral( [1,2,3],0,1) assert True, "poly_integral does not run." print("Problem 5 Test 1: Success!") "Check if poly_integral returns a float when p=1+x and a=0,b=1. (1 mark)" result = poly_integral ([1,1],0,1) assert isinstance(result, float) , "poly_integral should return a float." print("Problem 5 Test 2: Success!") "Check if poly_integral returns the correct values. This cell contains hidden tests. (3 marks)" result = poly_integral ([1,1],0,1) assert abs(result - 1.5)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