Answer:
The code is given in Python with appropriate tags/quotes for better understanding
Step-by-step explanation:
# python code that will compute and display information for a company which rents vehicles to its customers.
code = raw_input("Enter classification code (a character either B, D, or W): ")
days = int(raw_input("Enter number of days the vehicle was rented: "))
start = int(raw_input("odometer reading at the start of the rental period: "))
end = int(raw_input("odometer reading at the end of the rental period: "))
charge = 0.0
if code == 'B':
charge = 40.00*days + (end-start)*0.25
elif code == 'D':
charge = 60.00*days
if (end -start)/days > 100:
charge = charge + 0.25*((end-start)/days-100)
elif code == 'W':
if days > 7:
charge = charge + (days/7)*350
days = days%7
charge = charge + (days)*70
else:
charge = 350
else:
print "Invalid code"
print "Total charge: $" ,charge
'''
output:
Enter classification code (a character either B, D, or W): W
Enter number of days the vehicle was rented: 23
odometer reading at the start of the rental period: 2
odometer reading at the end of the rental period: 2
Total charge: $ 1190
'''