basic constructions bwrite another function with loop where the user is asked for time on the interval oe and the corresponding (interpolatedy value is written to the screen the loop is terminated when the user gives negative time cuse the following measurements : : : : : corresponding to times (min)and compute interpolated values at : and : min perform separate hand calculations to check that the output from the program is correct filenamelinear_interpolation py exercise test straight line requirement assume the straight line function xd write script that tests the "point-slopeform for this line as follows within chosen interval on the -axis (for examplefor between and )randomly pick points on the line and check if the following requirement is fulfilled for each pointf xi cd axi where is the slope of the line and defines fixed point cf /on the line let here filenametest_straight_line py exercise fit straight line to data assume some measurements yi have been collectedonce every second your task is to write program that fits straight line to those data amake function that computes the error between the straight line xd axcb and the measurementsed axi yi / bmake function with loop where you give and bthe corresponding value of is written to the screenand plot of the straight line xd ax together with the discrete measurements is shown hint to make the plotting from the loop to workyou may have to insert from matplotlib pylab import at the top of the script and also add show(after the plot command in the loop cgiven the measurements : : : : : at times use the function in bto interactively search for and such that is minimized filenamefit_straight_line py remarks fitting straight line to measured data points is very common task the manual search procedure in ccan be automated by using mathematical method called the method of least squares