Write a program which does the following:
1) Has data for the average monthly high temperatures of a city
2) Computes the amplitude of the cos curve that fits the data in 1)
3) Compute the center for the curve
4) Graphs for [0,11]
a) the best cos curve to fit your data
b) Your data points ( 0 is January, 11 is December)
5) Compute and print the error between your data points and the value
of the cos curve. This will be an array.
6) Add to your graph the graph of the error.
7) Compute and print the average error and the maximum error.
8) Compute and print the relative error (=error/actual value)
9) Print a sequence of zeros and ones telling whether the relative
error is greater than 5%
10) Compute and print the number of months for which the relative error
is greater than 5%
11) Compute the average relative error.
12) Do all the above for another city
13) Now print an array of 0’s and 1’s showing for which months the high
temperature for both cities was greater than 70.
14) Print an array of 0’s and 1’s showing for which months the high
temperature for both cities was less than 40.
15) Print an array of 0’s and 1’s showing for which months the high
temperature for either city was greater than 60.
16) Print an array of 0’s and 1’s showing for which months the high
temperature for only one city was greater than 75.