Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Provide a python program to determine the parking fees at the airport based on the following time conditions: Any amount of time less than or

Provide a python program to determine the parking fees at the airport based on the following time conditions:

Any amount of time less than or equal to one hour, the parking fee is 5.00. This means if your parked for 5, 15, 55 or 60 minutes you pay $5.00

Minutes parked

Hrs*Fee=parking fee

25 minutes (0 hour and 25 minutes)

1*5.00

05 minutes (0 hour and 5 minutes)

1*5.00

55 minutes (0 hours and 55 minutes)

1*5.00

30 minutes (0 hour and 30 minutes)

1*5.00

10 minutes (0 hour and 10 minutes)

1*5.00

60 minutes (1 hour and 0 minutes)

1*5.00

Any amount of time greater than one hour but less than or equal to 5 hours (300 minutes), the parking fee is 4.00 per hour and any fraction. This means:

Minutes parked

Hrs*Fee=parking fee

65 minutes (1 hour and 5 minutes)

2*4.00

95 minutes (1 hour and 35 minutes)

2*4.00

120 minutes (2 hours)

2*4.00

135 minutes (2 hour and 15 minutes)

3*4.00

180 minutes (3 hour and 0 minutes)

3*4.00

195 minutes (3 hour and 15 minutes)

4*4.00

240 minutes (4 hours)

4*4.00

260 minutes (4 hours 20 minutes )

5*4.00

300 minutes (5 hours)

5*4.00

Any amount of time greater than 5 hours, the parking fee is 2.00 per hour and any fraction. This means:

Minutes parked

Hrs*Fee = parking fee

400 minutes (6 hour and 40 minutes)

7*2.00

800 minutes (13 hour and 20 minutes)

14*2.00

825 minutes (13 hour and 45 minutes)

14*2.00

600 minutes (10 hours)

10*2.00

Suggested template PLEASE modify as needed : # $5 rate # $4 rate # $3 rate #various calculations : ROUND, INT % / // "x == " "x1 == " "y == " "Z == " "a == " "b == "# initialize " Please enter number of minutes parked..." if #table 1 "Parking fee for "" minutes is $" elifand # table 2 'we are in table 2 fee is ' else 'we are in table 3 fee == '

x == 25.3

x1 == 25.35

y == 24

Z == 54

a == 0.55

b == 0

Please enter number of minutes parked...

Parking fee for 58 minutes is $ 5

Algorithm :

Input: minutes parked

Output: Parking fee

Your program should ask the user how many minutes they parked, use the result of your calculations using the various operators as needed to determine in which table 1, 2 3 the minutes falls into and output the parking fee

Let m = minutes parked

Fee = parking fee

Once you have determined your algorithm, try it for several of the minute examples provided in the tables above for accuracy MAKE sure you try m = 300 and m = 60 and m = 600

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions