Answered step by step
Verified Expert Solution
Question
1 Approved Answer
my output is 300.00 and it is supposed to be 324.40. can someone tell me where my error is? Southern N Accessing Y How to
my output is 300.00 and it is supposed to be 324.40. can someone tell me where my error is?
Southern N Accessing Y How to How to Use Home C Codio-X 0 https://codio.com/rghent/project-1-draft-rental-car- Google W 000 C Codio Project File Edit Find View Tools Education Help Run Current - rental car-cu... rental car cu... X rental_car.py X import sys rentalCode=input('(B) udget, (Daily, or (W)eekly rental? ') rentalPeriod=float(input("Number of Days/Weeks Rented: ")) budget_charge-40 daily_charge=60 weekly_charge=190 if rentalCode=='B': baseCharge=rentalPeriod*budget_charge elif rentalCode=='D': baseCharge=rentalPeriod daily_charge else: 12 baseCharge=rentalPeriod weekly charge 13 odostart=float(input("Starting Odometer Reading: ")) odoEnd=float(input("Ending Odometer reading: ")) totalMiles=odoEnd-odoStart averageDayMiles=0 mileCharge=0 18 - if rentalCode=='B': 19 milecharge-totalMiles*.25 20 - elif rentalCode=='D': 21 averageDayMiles=totalMiles/rentalPeriod 22. if averageDayMiles900: mileCharge=100*rental Period else: mileCharge=0 amt Due = baseCharge + mileCharge 32 33 22% (24:5) O Type here to search 0 AL L Southern N Accessing Y How to How to Use Home C Codio https://codio.com/rghent/project-1-draft-rental-car- Codio Project File Edit Tools Education Help Find View ental car.py X Run Current - Google rental car-cu... X rental car-cu r 28 29- 30 averageWeekMiles=totalMiles/rentalPeriod if averageWeekMiles >900: mileCharge=100*rentalPeriod else: mileCharge=0 amtDue = baseCharge + mileCharge print('Rental Summary') print('Rental Code: '+str(rental Code)) print('Rental Period: 'str(int (rentalPeriod))) print('Starting Odometer: '+str(int (odostart))) print('Ending Odometer: ' +str(int (odoEnd))) print('Miles Driven: '+str(int (totalMiles))) print('Amount Due: '!${:, .2f}'.format(amt Due)) #2) Request time period the car was rented. 44 45 #Prompt --> "Number of Days Rented: #rentalPeriod = ? # OR #Prompt ---> "Number of Weeks Rented: #rentalPeriod = ? #CUSTOMER DATA CHECK 1 #ADD CODE HERE TO PRINT: #rental Code #rentalPeriod #Calculation Part 1 ##Set the base charge for the rental type as the variable basecharge. #The base charge is the rental period the appropriate rate: 58 59 rollo Cuctomer Dart Python 22% (24:5) 1 Type here to search D E L A g---standard:5df142b6b5 80% ... o Configure... - ental Sum... RGHENT 0 Collapse Rental Summary Starting Odometer Reading: Ending Odometer reading: Rental Summary Rental Code: D Rental Period: 5 Starting Odometer: 1234 Ending Odometer: 2222 Miles Driven: 988 Amount Due: $300.00 Expected: Number of Days Rented: Starting Odometer Reading: Ending Odometer Reading: Rental Summary Rental Code: D Rental Period: 5 Starting Odometer: Ending Odometer: 2222 Miles Driven: 988 Amount Due: $324.40 3 > a ge l a 4) 125/2020 WStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started