maximum temperature drop. Now she has the following problem; in a series of measurements she discovers one data point is
Interpolation
Assignment Description
Meike, our climate scientist, was very happy with the program you wrote to calculate the maximum temperature drop. Now she has the following problem; in a series of measurements she
discovers one data point is missing, but not which one. She does know that the measurements
show a constant increase.
Write a function, interpolate(list), that completes a given series. Provide as output the index
behind which the element should be inserted and the value. You can assume that the measurements are natural numbers and that the input consists of at least 3 measurements. You can assume
that both the first and the last data point have not been dropped
P.S. Meike is in a hurry; your
Example
Input Output 1 Output 2
[1, 2, 4] 1 3
[3, 7, 11, 19] 2 15
Notes
Make sure to turn in your code with the filename “Interpolation.py”. If you turn it in with
any other name it will fail the tests. This is due to instead of this assignment giving you an input
and you having to print an output. This assignment will run unit tests on your program itself.

Step by step
Solved in 3 steps with 1 images









