Question: In Python - Write a menu driven program that analyzes a data file containing sensor information. The menu should provide following options: 1 - Read

In Python - Write a menu driven program that analyzes a data file containing sensor information.
The menu should provide following options:
1- Read Sensor Data File
2- Analyze Data
3- Exit
Option 1 will read the provided datafile_lab2.txt
Download datafile_lab2.txtPreview the document file into lists. It will validate each line of information (aka record) to make sure that the record is complete.
The format of the data file is as follows:
Field 1- record number
Field 2- date / time
Field 3- temperature reading in Fahrenheit
NOTE: A missing field is an invalid record. A temperature field that doesn't contain an integer is an invalid record.
Option 2 will analyze the data and report:
- the number of days where the temperature was freezing or below
- the number of day where the temperature was 90 degrees or above.
-the coldest day (if more than one day with same low temp then report the first occurrence)
-the hottest day (if more than one day with same high temp then report the first occurrence)
- the number of invalid records
The program should end gracefully and thank the user with option 3.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!