
What your Python program should do
In the main part of your code outside of the functions
You need to create this code.
Ask the user to type in an order in this format (without the square brackets):
[table number]&[the name of the dish]$[c, g, s, or p]
The number is the table number. This is followed by an ampersand ‘&’.
Next is the name of the dish.
This is followed by a dollar sign ‘$’.
At the end is c, g, s, or p, in lowercase. This denotes which chef will receive the order. ‘c’ means that the order will go to the cold bar (salads, appetizers). ‘g’ means that it will go to the grill. ‘s’ means that it will go to the saute station. ‘p’ means that it will go to the pastry chef.
For example:
3&creme brulee$p
This means table number 3, the dish is called ‘creme brulee’, and it is going to the pastry chef.
The user will type all of this on one line with no spaces except for in the dish name.
Store this order into a list.
Let the user keep typing in orders. Store all orders in the same list. The user stops entering orders by typing in ‘x’ without quotes.
Once you have all of the orders, access each order in the list and send it to a function called profrich() that takes in the order as a parameter.
Send each order to a function called profrich(order)
You need to create the code for this function. The function definition and the parameter is given to you in the starter code. Do not change the name of this function.
The function separates out the various components of the order: table number, dish name, and which chef it is going to.
You need to send these three components to another function that will return a string.
Send these three components to a function called printout(table, dish, chef)
You need to create the code for this function. The function definition and the parameter is given to you in the starter code. Do not change the name of this function.
The output of this function is a string with the order details that is nicely formatted so the chef can easily read it.
First, add “T“, the table number, and a space to the string.
Next, process the dish name. Add the dish name to the string.
- If the length of the dish name is 10 characters or fewer, add the text “easy” to the string to let the chef know it’s an easy dish to cook.
- If the length of the dish name is more than 10 characters, add the text “RUSH” to the string to let the chef know they’re going to have to cook quickly to get the dish out on time.
Finally, look at the last letter in the order. If it is ‘c’, add ‘cold’ to the string. If it is ‘g’, add ‘grill’ to the string. If it is ‘s’, add ‘saute’ to the string. If it is ‘p’, add ‘pastry’ to the string.
Include spaces in the string like in normal writing.
Using our example from above, the order “3&creme brulee$p” would result in a string:
T3 creme brulee RUSH pastry
Return this string back to profrich().
Back inside profrich()
You need to continue creating the code for this function.
Store the string returned from printout(). Print it for the user.
profrich() does not need to return anything.
Back inside the main part of your program
This kicks the program back down to the main part (outside of the functions) where your code should automatically pull the next order from the list and send it to profrich(). You need to create this functionality.
Once you’ve processed all the orders, your program can end and show a funny message to the wait staff (e.g., your TA).
note by me = I sennt an output of what it should look like

![main.py x +
23 ▼
24
25 ▼
26
if chef == 'S':
output output + "saute"
if chef == 'p':
output = output + "pastry"
return output
27
28
29 while order != 'X':
30
31
32
33 for order in orders:
34
35
36
37
38
39
40
41
42
43
Line 28: Col 5
orders.append(order)
order = input ('Order: ')
orde = order.split('&')
table orde[0]
ordd = orde[1].split('$¹)
ordered ordd[0]
chefordd [1]
order = [table, ordered, chef]
profrich(order)
> Console x +
HELLO WELCOME TO MARIA'S KITCHEN WAIT STAFF. Enter orders one at a time or x to quit
Order: 1&steak$g
Order: x
Traceback (most recent call last):
File "main.py", line 33, in <module>
orde = order.split('&')
AttributeError: 'list' object has no attribute 'split'
KeyboardInterrupt
⠀
History C](https://content.bartleby.com/qna-images/question/309a0b45-81e4-45d0-8860-fe87ea651e15/6aaf92aa-4a7a-424e-9272-38f8b908524d/vqbwpk4_thumbnail.png)

Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

its still saying list object has no attritube split

the output is also missing a few things. this is what he output should look like

its still saying list object has no attritube split

the output is also missing a few things. this is what he output should look like

- Please see images, C++arrow_forwardIn C++ only Create a function called MultyDieRoll. It should take in an integer and run the function DieRoll that number of times, printing out each result to the console. So for instance, if you pass in a 7, it should output 7 random numbers; if you pass in a 21, it should output 21 random numbers.arrow_forwardI know you guys are using AI. Don't you dare give me AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.arrow_forward
- Code is in Pythonarrow_forwardin the C++ version please suppose to have a score corresponding with probabilities at the end and do not use the count[] function. Please explain the detail when coding. DO NOT USE ARRAY. The game of Pig The game of Pig is a dice game with simple rules: Two players race to reach 100 points. Each turn, a player repeatedly rolls a die until either a 1 ("pig") is rolled or the player holds and scores the sum of the rolls (i.e. the turn total). At any time during a player's turn, the player is faced with two decisions: roll - if the player rolls 1: the player scores nothing and it becomes the opponents turn. 2 - 6: the number is added to the player's turn total and the player's turn continues. hold - The turn total is added to the player's score and it becomes the opponent's turn. This game is a game of probability. Players can use their knowledge of probabilities to make an educated game decision. Assignment specifications Hold-at-20 means that the player will choose to roll…arrow_forwardIn C++ i need the fill in the functions that will complete this code for the program to work.arrow_forward
- Write a C++ program that will input temperatures for consecutive days. The program will store these values into an array and call a function that will return the average of the temperatures. It will also call a function that will return the highest temperature and a function that will return the lowest temperature. The user will input the number of temperatures to be read. There will be no more than 25 temperatures. For Full Credit You must have a comment block header at the top of your program. See the Standards document in Course Content You must use a constant to represent the maximum number of temperature readings You must use the correct data types for your constants and variables You must use an array of the correct data type You must validate your input. Check for number of invalid number of readings (> max, < 1, etc) and display appropriate error message. You must use one or more if/else branches for your decisions You must use a loop to read in the temperatures…arrow_forwardPlease complete the exercise as instructed and do not use global variables. Please follow the guidelines of what the solution cannot use provided in the second picture. Thank you!arrow_forwardPython code Screenshot and output is mustarrow_forward
- Need python help running code and others. Functions are ideal for use in menu-driven programs. When the user selects an item from a menu, the program can call the appropriate function. Write a menu-driven program for Burgers. Display the food menu to a user (Just show the 5 options' names and prices - No need to show the details!) Use numbers for the options and the number "6" to exit. If the user enters "6", your code should not ask any other questions, just show a message like "Thank you, hope to see you again!" Ask the user what he/she wants and how many of them. (Check the user inputs) Keep asking the user until he/she chooses the exit option. Use a data structure to save the quantities of the orders. You should use ArrayLists/Array Bags, or LinkedLists/LinkedBags (one or more of them) to save data. Calculate the price. Ask the user whether he/she is a student or a staff. There is no tax for students and a 9% tax for staff. Add the tax price to the total price.…arrow_forwardAlert dont submit AI generated answer. Please help fill in the code for the functions.The correct output is shown.arrow_forwardWrite a header for a function named getKey. The function should return a char and use no parameters.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





