Question 1 [20 points]
The McTavish weather station, located near the corner of McTavish Street and Docteur Penfield,
measures the weather several times over a protracted period. For this question, you must write a
program that accepts multiple lines of comma-separated numbers, where each number is a sensor
reading. Your program should ask for the readings repeatedly until the user enters "stop" on a single
line. Then, your program should print, on one line, the minimum, maximum and average value
of all of the sensor readings, as shown in the examples below. You must print the three float
values with only 2 decimal places. See the recent lecture slides on string formatting to
learn how to do this.
You must use a loop to ask the user to enter the readings, and use a list to store the readings. When
you calculate the minimum, maximum and average of the readings in the list, you are allowed to
use built-in functions this time. However, you must not use invalid inputs in your calculation
of the minimum, maximum and average. For example, if the user entered 30 readings in total, and
5 of them were invalid, then the minimum, maximum and average must be calculated from the 25
valid readings, ignoring the 5 invalid ones. An invalid input is defined as being either less than -70,
or greater than +50 degrees.
If all sensor readings given by the user are invalid, the program must print "Really broken sensor!"
instead of printing the three values.