Question: Can anyone help me with my Python program? The output is in the bottom. or if you leave your email, I'll send you a detail

Can anyone help me with my Python program? The output is in the bottom. or if you leave your email, I'll send you a detail directions.

Assignment Overview

This assignment focuses on the design, implementation and testing of a Python program which uses control structures to solve the problem described below. The control structures include:

  1. A For Loop

  2. If/Else Statements

1. The program will compute and display information which rents motorcycles to its customers. For a specified customer, the program will compute and display the amount of money charged for that customers motorcycle rental.

2. The program will prompt the user to enter the following four items for a given customer (in the specified order):

a. The customer's classification code (a character)

b. The number of days the motorcycle was rented (an integer)

c. The motorcycle's odometer reading at the start of the rental period (an integer)

d. The motorcycle's odometer reading at the end of the rental period (an integer)

The program will process information for 3 customers (using a for loop).

3. The program will compute the miles ridden by the customer during the rental period.

The odometer is read by a representative of the rental company at the start and at the end of the rental, and the readings are taken from a meter which has six digits and records tenths of a mile.

You will create a function called calculateMiles that takes in two arguments, the beginning odometer reading and the ending odometer reading. The function will return the appropriate number of miles ridden.

*See the assignment notes

4. The program will compute the amount of money that the customer will be billed, based on the customer's classification code, number of days in the rental period, and number of miles ridden. The program will recognize both uppercase and lowercase letters for the classification codes.

Code 'M' (Moneysaver)

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 miles but does not exceed 1500 miles;

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.

You must create functions for each of these calculations. The distance traveled in miles and the number of days rented will be the arguments and the return value is the amount of money the customer will be billed. Name the functions moneysaverBill, dailyBill and weeklyBill.

5. For each customer, the program will display a summary with the following information:

a. The customer's classification code

b. The number of days the motorcycle was rented

c. The motorcycle's odometer reading at the start of the rental period

d. The motorcycle's odometer reading at the end of the rental period

e. The number of miles ridden during the rental period

f. The amount of money billed to the customer for the rental period

All output will be appropriately labeled and formatted. The number of miles driven will be rounded to one fractional digit. The amount of money billed will be displayed with a dollar sign and will be rounded to two fractional digits (for example, $125.99 or $43.87).

6. The program will assume that all user inputs are valid and correct. That is, you do not have to validate the type of customer, the number of days, or odometer readings.

7. Properly comment your code.

8. Your program must have a main function. Make sure you call it!

Can anyone help me with my Python program? The output is in

At the prompts, please enter the following: Customer's classification code (a character) Number of days the motorcycle was rented (an integer) Odometer reading at the start of the rental period (an integer) Odometer reading at the start of the rental period (an integer) Customer code: D Number of days: 1 Odometer reading at the start: 100003 Odometer reading at the end: 100135 Customer summary: classification code: D rental period (days): 1 odometer reading at start: 100003 odometer reading at end: 100135 Number of miles driven: 13.2 amount due: $ 60.00 Customer code: m Number of days: 3 Odometer reading at the start: 999997 Odometer reading at the end: 5 Customer summary: classification code: M rental period (days): 3 odometer reading at start: 999997 odometer reading at end: 5 Number of miles driven: 0.8 amount due: $ 120.20 Customer code: W Number of days: 8 Odometer reading at the start: 100 Odometer reading at the end: 040100 Customer summary: classification code: W rental period (days): 8 odometer reading at start: 100 odometer reading at end: 40100 Number of miles driven: 4000.0 amount due: $ 1030.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!