Question: In the file gas _ prices.txt ( linked below ) you will find weekly U . S . gas prices for 1 9 9 4
In the file gasprices.txt linked below you will find weekly US gas prices for through The format is : as follows:
:
:
:
:
:
:
:
:
:
:
Write a program that reads this file and outputs a report containing the low price, average price, and high prices for each year, as well as the average prices for each month of each year, sorted by year and month, as follows:
:
Low: $ Avg: $ High: $
January $
February $
March $
April $
May $
June $
July $
August $
September $
October $
November $
December $
:
Low: $ Avg: $ High: $
January $
February $
March $
April $
May $
June $
July $
August $
September $
October $
November $
December $
Redirect your report to a file named gasreport.txt Submit that file along with your code in a file named gasprices.py
To redirect output from a program to a file, use in the command line when you run your program, as shown in this example:
python gasprices.py gasreport.tx
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
