Question: A structure chart showing the functional decomposition of your program ( may be hand drawn neatly and scanned into the report ) An IPO chart
A structure chart showing the functional decomposition of your program may be hand drawn
neatly and scanned into the report
An IPO chart for each userdefined function
In your code add comments at the beginning of the script that summarizes the inputs, process,
and outputs for the program.
For userdefined functions add comments to the function prototypes that describe the
preconditions and post condition for the function.
Answer the following questions:
What did you find most challenging with this program?
What problems did you encounter and how did you solve them?
What did you learn from writing this program?
Writing Gas Prices code python
This project consists of a series of programs to analyze gas prices between April and August
You will be provided with a text file named GasPrices.txt The file contains the weekly average prices for
a gallon of gas in the United States, beginning on April th and ending on August th
Figure shows an example of the first few lines of the files contents:
Figure The GasPrices.txt file
Each line in the file contains the average price for a gallon of gas on a specific date. Each line is
formatted in the following way:
MMDDYYYY:Price
MM is the twodigit month, DD is the twodigit day, and YYYY is the fourdigit year. Price is the average
price per gallon of gas on the specified date.
To get full credit for this project, you must complete programs and You will get extra credit for
completing programs and you will get credit for each extra program you complete
Average Price Per Year: Calculate the average price of gas per year, for each year in the file.
The files data starts in April of and it ends in August Use the data that is present
for the years and Produce a report showing each year and the average gas price for
that year.
Highest and Lowest Prices Per Year: For each year in the file, determine the date and amount
for the lowest price, and the highest price. Produce a report showing for each year, the lowest
price and date on which it occurred and the highest price and the date on which it occurred
show one year per line
Average Price Per Month: Calculate the average price for each month in the file. Produce a
report that shows each month and year and the average price for that month and year.
List of Prices, Lowest to Highest: Generate a text file that lists the dates and prices, sorted from
the lowest price to the highest.
List of Prices, Highest to lowest: Generate a text file that lists the dates and prices, sorted from
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
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
