Question
IN PYTHON Your friend Ellen has just started her own catering company. She needs a program to help her provide estimates for potential clients planning
IN PYTHON Your friend Ellen has just started her own catering company. She needs a program to help her provide estimates for potential clients planning an event. Ellen provides one server for each 20 guests. Servers make $20.00 per hour ($.50 per minute for extra minutes). Ellen also charges 25.00 per meal.
Your program is to define the following 4 functions:
menu()
This function prints out the options available for the user of the program. The user is to be able to choose between finding out:
the number of servers required for an event,
the cost of servers for an event,
the cost of food for an event,
the total cost for an event
exiting the program
numServers(num_patrons)
This function accepts one parameter, the number of patrons for an event, calculates and returns the number of servers needed. Keep in mind that all patrons need good service, so although a server is provided for each 20 guests, an additional server would be required for 22 patrons.
costOfFood(num_patrons)
This function accepts one parameter, the number of guests for an event, calculates and returns the total food cost for the event, assuming 25.00 per guest.
serverCost (n_servers, timeMinutes)
This function accepts two parameters, the number of servers working an event and the time (in minutes) of the event. The function will calculate and returns the total amount paid for all servers at the event. $20 per hour, .50 for each extra minute. (eg 123 minutes will be 2 hours and 3 minutes = 2 * $20 + 3 * .50).
Although the only the menu() function is to print anything to the screen, you may want to include print statements in the functions while testing that your program works correctly.
THE MAIN PROCESS:
*The user will provide two input values - the number of guests
the length of time (in minutes) for the event
Your program is to verify that each of the input values is valid prior to continuing (ie. re-prompt the user until a positive value is input)
* Your program will next allow the user to choose between the following options, UNTIL THE USER WISHES TO EXIT:
* the number of servers required -- call numServers to do calculation
* the cost of food for the event -- call costOfFood to do calculation
* the cost of service (total amount paid to all servers) -- call serverCost to do calculation
* the total cost for the event (cost of food + service) call costOfFood and serverCost to help here
**Be sure that your program names variables in a meaningful manner. Comment all function definitions to indicate what the function will do, and comment your program body to indicate what is going on (remember, each line does not need a comment, just each group of statements that performs one task). A comment need not be a complete sentence, just a short, to the point, phrase.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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