Question: CMPSC 121 Name Lab Experiment #O7 Sect Purpose: This experiment is designed to develop confidence with loops and reading text files Readings: The experiment focuses
CMPSC 121 Name Lab Experiment #O7 Sect Purpose: This experiment is designed to develop confidence with loops and reading text files Readings: The experiment focuses upon the material concerning loops reading text files. Instructions: Write a program which reads in the file, FleetInput.txt. have given you a template the program on the last page, but you are not limited to it. The file to read in is on Canvas in this week's module. Each line of data in the field include vehicleID, mile gallons. Here are some of the lines in the file. 279BX6KY 2 582.2 20.5 802 MD8B24Q 723.6 25.1 671AY6DZ3N 756.9 27.5 your program should produce a report like the followings. Make sure that the out well formatted. AMSCO Fleet Report Vehicle ID Miles Gallons MPG 20.5 28.4 279 BX6KY2Z 582.2 25.1 28.8... 802MX8BZ4Q 723.6 more lines Total Miles 6751.3 Average MPG: 23.6 Vehicle ID with Best MPG 109QW2RP2Y 36 Vehicle ID with Worst MPG 122ACOUG7P 15.6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
