Question: Homework Description In Python Design a program for a company which rents vehicles to its customers. Your program will prompt the user to enter the

Homework Description

In Python

Design a program for a company which rents vehicles to its customers. Your program will prompt the user to enter the following 4 items:

The customers classification code (a character)

The number of days the vehicle was rented (an integer)

The vehicles odometer reading at the start of the rental period (an integer)

The vehicles odometer reading at the end of the rental period (an integer)

The program will then process that customer information and compute the amount of money that the customer will be billed based on the customers classification code, number of days in the rental period, and number of miles driven. The program will recognize both upper case and lower case letters for the classification codes. For example, your program will accept either B or b from user input for classification code.

There are 3 classification codes:

Code B (budget)

Base charge: $40.00 for each day

Mileage charge: $0.25 for each mile driven

Code D (daily)

Base charge: $60.00 for each day

Mileage charge: No charge if the average number of miles driven per day is 100 miles or less; otherwise, $0.25 for each mile driven above the 100 mile per day limit.

Code W (weekly)

Base charge: $190.00 for each week or fraction of a week

Mileage charge: No charge if the average number of miles driven per week is 900 miles or less; $100.00 per week if the average number of miles driven per week exceeds 900 (>900) miles but does not exceed 1500 miles (<= 1500); otherwise $200.00 per week plus $0.25 for each mile driven above the 1500 mile per week limit.

The amount billed to the customer is the sum of the base charge and the mileage charge.

Your program will compute the number of miles driven by the customer during the rental period. The odometer readings are taken from an odometer which has 6 digits. Prepend leading zeros to ensure all 6 digits are occupied when displaying the information to the customers. The following is an example to display to the customer:

The vehicle's odometer reading at the start of the rental period: 009156

The vehicle's odometer reading at the end of the rental period: 012487

Your program will display a summary with the following information:

The customers classification code

The number of days the vehicle was rented

The vehicles odometer reading at the start of the rental period

The vehicles odometer reading at the end of the rental period

The number of miles driven during the rental period

The amount of money billed to the customer for the rental period: base charge, mileage charge, and the total charge.

The amount of money billed will be displayed with a dollar sign and will be formatted to two fractional digits (for example $100.25 or $200.00).

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!