Home /
Expert Answers /
Computer Science /
advanced-level-python-programming-need-step-explanation-thanks-in-advance-1-the-text-file-pa882
(Solved):
Advanced level python programming. Need step explanation. Thanks in advance.
1 The text file ...
Advanced level python programming. Need step explanation. Thanks in advance.
1 The text file TEMPERATURE. txt contains the mean daily temperature from January 1982 to June 2017. Each line of record is in the format < year >?< month> <mean daily temperature> For examples, 1982-01 29.8 and 2017-06 31.6 Task 1.1 Write program code that will - read the data from the text file, - calculate the average of all the available monthly temperatures by year, by totalling up the temperatures for each month of that year and divided by the number of months, - output the average temperature for that year (from 1982 to 2017), in 3 decimal places. - Use the following format: Evidence 1: Program code for Task 1.1. Evidence 2: Screenshot of running program. Task 1.2 Sort by temperature and output the average temperature by year, in ascending order of temperature. If temperatures are the same, then display the later year before the earlier year. For example, if year 2017 and 1989 have the same temperature, then display 2017 before 1989.