Question: By python language .. Write a program (mileage.py) that reads gallons and miles from input file mileage.txt and compute the ratio column and the average

By python language ..  By python language .. Write a program (mileage.py) that reads gallons

Write a program (mileage.py) that reads gallons and miles from input file "mileage.txt" and compute the ratio column and the average miles per gallon and write results in a new file. The results must be also displayed on screen as shown in Figure 1. 12.89 287 10.30 200 5.25 120 Figure 1. Sample input file "mileage.txt Gallons Hiles Rat io 12.89 10.39 5.25 287 280 120 19.42 22.86 he Overall Average was 21.5 Figure 2. Sample screen output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!