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 3 meals: beef meal for $15.95, chicken meal for $13.95, and vegan meal for $10.95. The user is requested to enter the number of beef, chicken, and vegan meals. An 18% gratuity is added to the food cost. There are four banquet halls. Room 1 seats 200 and has a rental fee of $250. Room 2 seats 150 and has a rental fee of $200. Room 3 seats 100 and has a rental fee of $75. Room 4 seats 30 and has a rental fee of $50. A 6.0% 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 0, display an error message about invalid data and end the program. If the total number of meals exceeds 200, display an error message that there is no room large enough and end the program. Use sys.exit() function from the sys module.
Processing:
Determine the smallest size room that will accommodate the party and compute room cost and tax using an if-elif 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 30 with left alignment. Sample code is listed below to illustrate F-strings.
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 if-elif-else 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.
10 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 0.
The program ends with a message if total meals exceeds 200.
Room cost code uses an if-elif-else and assigns the correct value.
Room tax is computed correctly.
Meal costs for each meal type are computed correctly.
Gratuity is computed correctly.
5 pts
5 pts
5 pts
5 pts
5 pts
5 pts
10 pts
5 pts
5 pts
Total cost is computed correctly.
5 pts
The report uses if logic to only display output for meals that are requested.
The report uses F strings correctly to format output.
5 pts
15 pts
15 pts
A caterer has asked you to write a program to

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!