Question: solve function (using lists) by python Problem 2 Write a program that would ask the user to enter data about a number of cars and

solve function (using lists) by python Problem 2 Write a program thatsolve function (using lists) by python

Problem 2 Write a program that would ask the user to enter data about a number of cars and store this information in a 2-dimensional list of Nx4 where N is as many cars as the user wishes to enter. Each row represents one car in the inventory. The columns will represent the following: Column 1 is how many doors a car has; Column 2 is how many seats; Column 3 is if the car has GPS and takes only Y or N; Column 4 is how many cylinders a car has. The main or driver of the program must call a function called getData() which does all of the above. The function returns a 2-dimensional list to main. The main must then call another function called showroom(matrix) that will receive this 2- dimensional list and then print each car's data neatly organized as in the sample run. Note: Assume the user enters all data correctly. Sample Run: How many cars do you want to enter? 3 How many doors does car i have? 2 How many seats does car i have? 2 Does car i have GPS? (Y/N) N How many cylinders does car 1 have? 8 How many doors does car 2 have? 4 How many seats does car 2 have? 5 Does car 2 have GPS? (Y/N) Y How many cylinders does car 2 have? 4 How many doors does car 3 have? 5 How many seats does car 3 have? 7 Does car 3 have GPS? (Y/N) Y How many cylinders does car 3 have? 6 Doors 2 Car # 1: Car # 2: Car # 3: Seats 2 5 7 GPS Cylinders N 8 Y 4 Y 6 5

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!