Question: Design a python program to calculate the bill for a newly opened Airport Car parking center using Dictionary, where the center charges its customers based

 Design a python program to calculate the bill for a newly

opened Airport Car parking center using Dictionary, where the center charges itscustomers based on the following fare details. Day basis 100/day, weekly plan

Design a python program to calculate the bill for a newly opened Airport Car parking center using Dictionary, where the center charges its customers based on the following fare details. Day basis 100/day, weekly plan 600/week, monthly plan 2200/month, yearly plan 22000/year. If monthly plan is selected, then for that month, client can park and take vehicle as many times needed. Same applies for weekly/yearly plan. On the day of parking, client has to make the advance payment based on plan chosen, extra amount if any has to be paid while taking the vehicle. If client goes for 11 days trip, charge would be 600[Advancepayment]+400[BalancePayment]=1000 Rs under Weekly plan. Store the details of vehicles in a dictionary with Keys as follows, CarNumber, CheckinDate, Plan, Advance Paid. Given a vehicle number and CheckOutDate, traverse through the dictionary through CarNumber, calculate the number of days(define User Defined Function) based on CheckInDate and CheckOutDate, then bill has to be generated. For example, if CheckInDate is 28-10-2021 and CheckOutDate is 4-11-2021, then number of days is 8 and TotalBill is 600+100 under weekly plan. Define a function to read the input values and create dictionary. Input Format Number of cars Car 1 registration number Car 1 CheckInDate Car 1 Plan (Day/Week/Month/Year] Car 1 Advance Payment Car n registration number Carn CheckinDate Car n Plan (Day/Week/Month/Year] Car n Advance Payment CheckOutCar Number CheckOutDate Output Format Each Car details has to be printed from dictionary CheckOutCar Number Available/NotAvailable NumberOfDaysParked BalanceAmountToPay Sample Input: 2 TN23AB1001 28-10-2021 Day 100 TN23AB2002 29-10-2021 Week 600 TN23AB1001 04-11-2021 Output: {"CarNumber': 'TN23AB1001', 'CheckInDate': '28-10-2021', 'Plan': 'Day', 'AdvancePaid': '100'} {"CarNumber': 'TN23AB2002', 'CheckInDate': '29-10-2021', 'Plan': 'Week', 'AdvancePaid': '600'} TN23AB1001 Available NumberOfDaysParked 8 BalanceAmountToPay 700

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!