Collect Customer Data - Part 2Collect Mileage information:Prompt: "Starting Odometer Reading:\n"Variable: odoStart = ?Prompt: "Ending Odometer Reading:\n"Variable: odoEnd = ?Add code to PRINT odoStart and odoEnd variables as well as the totalMiles to check your work.The following data will be used as input in the test:
- Prompt the user to input the starting odometer reading (expect type int from the user)
- Prompt the user to input the ending odometer reading (expect type int from the user)
- Test your code.
import sys'''Section 1: Collect customer input'''#Add customer input 1 here, rentalCode = ?#Collect Customer Data - Part 2#4)Collect Mileage information:#a) Prompt the user to input the starting odometer reading and store it as the variable odoStart#Prompt -->"Starting Odometer Reading:\n"# odoStart = ?#b) Prompt the user to input the ending odometer reading and store it as the variable odoEnd#Prompt -->"Ending Odometer Reading:"# odoEnd = ?#c) Calculate total miles#Print odoStart, odoEnd and totalMiles# Calculate Charges 2## Calculate the mileage charge and store it as# the variable mileCharge:#a) Code 'B' (budget) mileage charge: $0.25 for each mile driven#b) Code 'D' (daily) mileage charge: no charge if the average# number of miles driven per day is 100 miles or less;# i) Calculate the averageDayMiles (totalMiles/rentalPeriod)
# ii) If averageDayMiles is above the 100 mile per day# limit:# (1) calculate extraMiles (averageDayMiles - 100)# (2) mileCharge is the charge for extraMiles,# $0.25 for each mile
#c) Code 'W' (weekly) mileage charge: no charge if the# average number of miles driven per week is# 900 miles or less;# i) Calculate the averageWeekMiles (totalMiles/ rentalPeriod)# ii) mileCharge is $100.00 per week if the average number of miles driven per week exceeds 900 milesIm getting a Error on my Script at line 55:LAST RUN on 9/14/2019, 8:44:31 AMCheck 1 failedOutput:File "rental_car-customer-data-2.py", line 55 elifrentalCode == 'W' or rentalCode=='w': ^ SyntaxError: invalid syntaxExpected:Starting Odometer Reading: Ending Odometer Reading: 1234 2222 988My Script:import sys
'''Section 1: Collect customer input'''#Add customer input 1 here, rentalCode = ?rentalCode = input("(B)udget, (D)aily, or (W)eekly rental?\n")print (rentalCode)#Collect Customer Data - Part 2#4)Collect Mileage information:#a) Prompt the user to input the starting odometerreading and store it as the variable odoStart #Prompt -->"Starting Odometer Reading:\n"# odoStart = ?odoStart = input('Starting Odometer Reading: ')#b) Prompt the user to input the ending odometer reading and store it as the variable odoEnd#Prompt -->"Ending Odometer Reading:"# odoEnd = ?odoEnd = input('Ending Odometer Reading: ')
#c) Calculate total milestotalMiles = int(odoEnd) - int(odoStart)#Print odoStart, odoEnd and totalMilesprint (odoStart)print (odoEnd)print (totalMiles)# Calculate Charges 2## Calculate the mileage charge and store it as# the variable mileCharge:#a) Code 'B' (budget) mileage charge: $0.25 for each mile drivenif rentalCode == "B" or rentalCode=='b':mileCharge = totalMiles * 0.25#b) Code 'D' (daily) mileage charge: no charge if the average# number of miles driven per day is 100 miles or less;# i) Calculate the averageDayMiles (totalMiles/rentalPeriod)elif rentalCode == "D" or rentalCode=='d':rentalPeriod = int(input('Enter days rented: '))averageDayMiles = totalMiles/rentalPeriodifaverageDayMiles <=><=900:milecharge=0else:milecharge=100*rentalweekprint('charges>
# ii) mileCharge is $100.00 per week if the average number of miles driven per week exceeds 900 miles
=900:milecharge=0else:milecharge=100*rentalweekprint('charges>=>