Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python Problem A text file (Car_sale2.txt) with information about some cars is provided to you. This is a screenshot of the first lines with

using python

image text in transcribedimage text in transcribedimage text in transcribed

Problem A text file (Car_sale2.txt) with information about some cars is provided to you. This is a screenshot of the first lines with the header (1st line). Actually, the figure shown below is the screenshot of the same file in csv format. Model Integra TL Manufacturer Acura Acura Acura Audi Audi Audi BMW BMW Buick Buick Buick Buick Cadillac Cadillac A4 AS AS 3281 5281 Century Regal Park Avenue LeSabre Deville Seville Sales_in_thousands _year_resale_value Vehicle_type Price_in_thousands Engine_size Horsepower Wheelbase Width Length Curb_weight Fuel_capacity fuel_efficiency latest_Launch Power_perf_factor 16 919 16.36 Passenger 21.5 1.8 140 1012 67.3 172.4 2.639 13.2 28 2/2/12 58.28014952 39.384 19.875 Passenger 28.4 3.2 225 108.1 70.3 192.9 3.517 172 25 6/3/11 8.588 91.37077766 29.725 42 Passenger 3.5 210 114.6 71.4 196.6 3.85 18 22 91.38977933 20.397 22.255 Passenger 3/10/11 23.99 1.8 150 102.6 68.2 178 2.998 16.4 27 18.78 23.555 10/8/11 62.7776392 Passenger 33.95 2.8 200 108.7 76.1 192 3.561 18.5 22 8/9/11 84.56510502 1.38 39 Passenger 62 310 113 74 1982 3.902 22.7 21 134.6568582 9.231 28.675 2/27/12 Passenger 33.4 28 193 107.3 68.5 176 3.197 16.6 24 1/29/12 81.87706856 17.527 36.125 Passenger 38.9 2.8 193 111.4 70.9 3.472 18.5 25 4/4/11 83.9987238 91.561 12.425 Passenger 21.975 3.1 125 109 72.7 1946 3.368 17.5 25 39.35 11/2/11 71.18145132 13.74 Passenger 25.3 3.8 240 109 72.7 1962 3.543 17.5 23 95.63670253 27.851 20.19 9/11 Passenger 31.965 3.8 205 113.8 74,7 206.8 3.778 18.5 24 85.82840825 83.257 13.36 3/23/12 Passenger 27.885 205 112.2 73.5 200 3.591 17.5 25 7/23/11 63.729 84.25452581 22.525 Passenger 39.895 4.6 275 115.3 74,5 207 2 3.978 18.5 22 2/23/12 113.8545976 15.943 27.1 Passenger 44.475 4.6 275 112.2 75 201 18.5 22 4/29/11 115.6213578 Objectives: 1. Display the names of the available car manufacturers. 2. Calculate the total profits of each car manufacturer. 3. Calculate the total profits for all car manufacturers. 4. Calculate the average fuel efficiency of all car manufacturers. 5. Display the car that are above and below average fuel efficiency as follows: Car by fuel effeciency EEEE > average | average |

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions