Question: Create a program to compute the fee for parking in a garage for a number of hours. The program should: Prompt the user for how

Create a program to compute the fee for parking in a garage for a number of hours. The program should:
Prompt the user for how many hours parked
Calculate the fee based on the following rules:
$2.50/hour
minimum fee is $6.00
maximum fee is $20.00
Print the result
For your program, define and use the following two functions:
# use input() to prompt for the # of hours parked, and return this value
def getParkingHours():
# takes as input hours (a number), and returns the parking fee
def calcParkingFee(hours):Convert the program to a "Modularized" menu driven program, the zipped folder linked below contains a modularized menu driven program.
The two functions you created in step 3(getParkingHours, calcParkingFee(hours) above are to be saved in a DIFFERENT file (so both functions in ONE file). give the file a discriptive name.
The main file is to display the menu shown below and call the functions you saved in that other file, when/if the user chooses to compute parking fee.
Note the program should only stop if the user enters 2, meaning the only when the user chooses to stop.
If a value other than 1 or 2 is entered, the program should display a statement that tells the user the value they entered is invalid and then display the menu again.
MENU
Calculate Parking Fee
Exit
Create a program to compute the fee for parking

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 Programming Questions!