Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. Data File contains: 67,Apr 13202012:04:05,97
68,Apr 14202012:04:05,39
69,Apr 15202012:04:05,24
70,Apr 16202012:04:05,24
71,Apr 17202012:04:05,97
72,Apr 18202012:04:05,94
73,Apr 19202012:04:05,9
74,Apr 20202012:04:05,71
75,Apr 21202012:04:05,NaN
76,Apr 22202012:04:05,72
77,Apr 23202012:04:05,46
78,Apr 24202012:04:05,83
79,Apr 25202012:04:05,19
80,Apr 26202012:04:05,92
81,Apr 27202012:04:05,7
82,Apr 28202012:04:05,13
83,Apr 29202012:04:05,15
84,Apr 30202012:04:05,62
85,May 01202012:04:05,0
86,May 02202012:04:05,57
87,May 03202012:04:05,85
88,May 04202012:04:05,49
89,May 05202012:04:05,4
90,May 06202012:04:05,32
91,May 07202012:04:05,46
92,May 08202012:04:05,61
93,May 09202012:04:05,12
94,May 10202012:04:05,93
95,May 11202012:04:05,6
96,May 12202012:04:05,35
97,May 13202012:04:05,8
98,May 14202012:04:05,NaN
99,May 15202012:04:05,77

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago