The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 3 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
hi, Adi
Can you help me with this two again, which you could not pretty understand? I am in hurry now.
Â
cha 5
6. Fuel Economy A fuel-economy study was carried out for five models of cars. Each
car was driven 100 miles, and then the model of the car and the number of gallons
used were placed in a line of the file Mileage.txt. Table 5.11 shows the data for the
entries of the file. Write a program to display the models and their average miles per
gallon in decreasing order with respect to mileage. See Fig. 5.51. The program should
create a dictionary of five items, with a key for each model, and a two-tuple for each
value. Each two-tuple should be of the form (number of test vehicles for the model, total
number of gallons used by the model).
Â
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly