Question: please help me how to solve the questions. Specific Requirements P1 See the HW08P1.py file provided in the zipped folder. Each comment line specifies a
please help me how to solve the questions.
Specific Requirements P1 See the HW08P1.py file provided in the zipped folder. Each comment line specifies a requirement. In the line after each comment, write a Python statement to meet that requirement. Note that you should meet the requirements without modifying in any way the class definition provided in the file. P2 Write a program that implements the class design from HW08A and then implements the requirements listed below in sequence. Note that it is acceptable to adjust the class design from HW08A to accommodate these requirements. Assume that no input data validations are needed. The program should create records for two cars with data as provided below and prompt for user input for data to create a third car record. Note: The second car is new and has never been rented before. Car VIN Year Color Odometer Rental Miles Rental Days No. of rentals 1 101 2016 Blue 40000 35000 600 50 2 102 2022 Red 15 The program should print the basic information (VIN, make, year, color, & odometer reading) for Car 1. The program should process the following set of transactions (and, optionally, feel free to make up any transactions for the third car): Car 1 rented for 10 days and returned with odometer reading 42065 Car 2 rented for 3 days and returned with odometer reading 1181 Car 2 rented for 3 days and returned with odometer reading 1400 Car 2 rented for 5 days and returned with odometer reading 2122 Car 1 taken for service and returned with odometer reading 42080 Car 2 rented for 7 days and returned with odometer reading 3123 Car 1 rented for 12 days and returned with odometer reading 44786 Car 1 painted yellow Car 2 rented for 14 days and returned with odometer reading 4357 The program should print the basic information (VIN, make, year, color, & odometer reading) for Car 1. The program should check and then display whether Car 1 should be sold. The program should display the total number of cars. The program should compute and display the following metrics for each car. Note that cars in their first year, i.e., less than a year old are considered to be a year old for these metrics, cars in their second year are two years old, and so on. Average rental miles per year Average rental days per year Average number of times rented per year Average number of miles per rental Average number of days per rental
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
