10. The daily high temperature (F) in New York City and Denver, Colorado, during the month of...

Question:

10. The daily high temperature (°F) in New York City and Denver, Colorado, during the month of January 2014 is given in the vectors below (data from the U.S. National Oceanic and Atmospheric Administration).

NYC = [33 33 18 29 40 55 19 22 32 37 58 54 51 52 45 41 45 39 36 45 33 18 19 19 28 34 44 21 23 30 39]

DEN = [39 48 61 39 14 37 43 38 46 39 55 46 46 39 54 45 52 52 62 45 62 40 25 57 60 57 20 32 50 48 28]

where the elements in the vectors are in the order of the days in the month.

Write a program in a script file that determines and displays the following information:

(a) The average temperature for the month in each city (rounded to the nearest degree).

(b) The number of days that the temperature was above the average in each city.

(c) The number of days that the temperature in Denver was higher than the temperature in New York.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: