Question: A caterer has asked you to write a program to produce a customer bill. The caterer provides 3 meals: beef meal for $ 1 5
A caterer has asked you to write a program to produce a customer bill. The caterer provides meals: beef meal for $ chicken meal for $ and vegan meal for $ The user is requested to enter the number of beef, chicken, and vegan meals. An gratuity is added to the food cost. There are four banquet halls. Room seats and has a rental fee of $ Room seats and has a rental fee of $ Room seats and has a rental fee of $ Room seats and has a rental fee of $ A state tax is added to the room cost. The program should use named constants for gratuity and state tax. Other constants are designed at your discretion.
Input: The number of beef meals, chicken meals, and vegan meals is read from the keyboard. If any number is less than display an error message about invalid data and end the program. If the total number of meals exceeds display an error message that there is no room large enough and end the program. Use sysexit function from the sys module.
Processing:
Determine the smallest size room that will accommodate the party and compute room cost and tax using an ifelif statement. Compute the cost of each type of meal type, food gratuity, and total cost.
Output:
Your name should be the first line of output. Produce a neat bill see sample below If there are no meals of a type ex no beef meals do not display number of meals or cost for that meal type in the bill. The first column has a width of with left alignment. Sample code is listed below to illustrate Fstrings.
In python
Add comments as follows:
At the top of the program place a brief description of the program and your name
Named constants should be commented
Major blocks of code and computations should be commented
Code Requirements:
Code should illustrate an example of ifelifelse to compute room cost
Code should illustrate the or logical operator when testing for invalid number of meals in any of the categories to end the program
Code should use F strings to format output.
Grading Rubric:
The instructor may not accept a program for design or logic issues and may ask for a meeting to discuss the code with a possible resubmission. In general, code is not accepted that generates syntax errors. If you are not able to complete all the tasks, submit the last running version of the code for partial credit.
Commenting is done as requested so the reader can follow the program.
Variables and constants are named appropriately.
Named constants are used in the program.
pts
The input section uses clear uses prompts and appropriate data types.
Code illustrates use of the or operator when checking valid meal numbers.
The program ends with a message if any of the meal numbers is less than
The program ends with a message if total meals exceeds
Room cost code uses an ifelifelse and assigns the correct value.
Room tax is computed correctly.
Meal costs for each meal type are computed correctly.
Gratuity is computed correctly.
pts
pts
pts
pts
pts
pts
pts
pts
pts
Total cost is computed correctly.
pts
The report uses if logic to only display output for meals that are requested.
The report uses F strings correctly to format output.
pts
pts
pts
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
