Page 1 of 1

The program almanac.py, given below, is used to analyze weather data. The file “weather.txt”, attached, contains hourly

Posted: Sun Jul 03, 2022 9:58 am
by answerhappygod
The program almanac.py, given below, is used to analyze weatherdata. The file “weather.txt”, attached, contains hourly weatherdata for the city of Toronto recorded between October 18 and Nov 8,2021. Each record is stored on a separate line and it consists ofcomma separated fields containing (from left to right) thedate/time, air pressure, wind speed, humidity, temperature, andhealth index. Complete the implementation of the functionsrec_read, and high_health for the program almanac.py to fulfill thefollowing functional behavior: 1. The function rec_read shall readweather records from the file weather.txt and store them in adictionary with date/time values as keys and Weather objects asvalues. 2. The function high_health shall find and return thedate/time instances for which the highest health index value wasrecorded. The following is the expected output of the program forthe input file weather.txt, attached. Note: The submitted solutionmust not make any changes to almanac.py except for the locationsindicated by #TODO in the functions rec_read, andhigh_health.