Question: 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 Python 3 Jupyter notebook. Please check if all tests pass Represent

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

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!