PYTHON BASIC CODE Use the file called Gas Price.TXT, the file contains weekly average price for a gallon of gas between

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

PYTHON BASIC CODE Use the file called Gas Price.TXT, the file contains weekly average price for a gallon of gas between

Post by answerhappygod »

Python Basic Code Use The File Called Gas Price Txt The File Contains Weekly Average Price For A Gallon Of Gas Between 1
Python Basic Code Use The File Called Gas Price Txt The File Contains Weekly Average Price For A Gallon Of Gas Between 1 (61.54 KiB) Viewed 27 times
PYTHON BASIC CODE Use the file called Gas Price.TXT, the file contains weekly average price for a gallon of gas between April 5th, 1993, and ending on August 26th, 2013. 04-05-1993:1.068 04-12-1993:1.079 04-19-1993:1.079 04-26-1993:1.086 05-03-1993:1.086 05-10-1993:1.097 05-17-1993:1.106 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: MM-DD-YYYY:Price Write a program that reads the content of the file and perform the following calculations: Average Price per year: Calculate the average price of gas per year, for each year in the file. Average Price Per Month: Calculate the average price for each month in the file Highest and Lowest Price Per year: for each year in the file determine the date and amount for the lowest price, and the highest price. List of Price, Lowest to Highest: Generate a text file that lists the dates and prices, sorted from the lowest to highest. List of Prices Highest to Lowest: Generate a text file that lists the dates and prices, sorted from highest price to the lowest.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply