Question: Phyton Code Use variables, loops, if statements, and own functions. Do not use functions availables in python modules a. Function that sum of all the
Phyton Code
Use variables, loops, if statements, and own functions. Do not use functions availables in python modules
a. Function that sum of all the even values in the array that contain integer and float numbers. def ASE(a) a: array
b. Function that sum of the absolute values of all the small entries in the matrix that contain integer and float numbers. def MSS(a, b) a: matrix b: positive float or integer. Any absolute value <= this value is considered to be small.
c. Function that return the value of the polynomial for the given value of x, computed using Horner's Rule. def HNR(x, c) x: float c: array containing the coefficients of a polynomial, in order from the coefficient of the lowest power to the coefficient of the highest power.
d. Write a function defined as: def interp1d(x,xvals, yvals): x: a float or integer xvals: an array of floats or integers yvals: another array of floats or integers return value: the linearly interpolated value from yvals, based on the location of the x value within xvals. Note: you may assume that the xvals are arranged from small to large. You may also assume the x value is bounded between at least one pair of values in xvals.
e. Type and call this main() function to test the four functions defined above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
