Question
download the file Task.2.txt this has daily temperatures for January and july for years 1950-2022 years is column 1, Jan is column 2, and then
download the file Task.2.txt this has daily temperatures for January and july for years 1950-2022
years is column 1, Jan is column 2, and then July is the third column. no column headers. Each month in the year has 31 days so the first 31 rows apply to a single year.
so develop a python script that reads the data from the file , then for each year (1950-2022) it computes the avg temp for January and then July
Have it then open a new text file Task2_results.txt for writing and write three columns. year,January avg temperature, and july avg temperature. The first column should be the headers. One decimal pt for the avg.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started