Case scenario You have been hired at Angela's Kitchen, a restaurant in Los Angeles. Chef and owner Angela has been asking her wait staff to take orders on paper. She would like a new system where the wait staff can type in orders. The system should also print tickets for the kitchen staff that are easy to read so they know what dish to make and what table it belongs to. What your Python program should do Your starter code should be (do not change this) def printout(table, dish, chef): # Finish the rest of this function def kitchen(order): # Finish the rest of this function # Start your main block of code here In the main part of your code outside of the functions 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 pl 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 kitchen () that takes in the order as a parameter. Send each order to a function called kitchen (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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
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.
a. 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.
b.
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 the example from above, the order "3&creme brulee$p" would result in a string:
T3 creme brulee RUSH pastry
Return this string back to kitchen ().
Back inside kitchen ()
You need to continue creating the code for this function.
Store the string returned from printout (). Print it for the user.
kitchen () 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 kitchen (). You need to create this function.
Once you've processed all the orders, your program can end.
Clarifications
The table number can be more than one digit. Therefore, don't try to get the table number by
indexing the first character of the order.
● The chef type (c, g, s, or p) will always be one lowercase letter; however, don't try to index to get
that either. You want to allow for flexibility in case Chef Angela adds more chef types in the future
that may have two or more characters.
The dish name can contain spaces. You don't have to worry about capitalization. The rest of the
order will be typed in without spaces.
Reminder: the user can type in as many orders as they want until they enter 'x'.
Transcribed Image Text: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. a. 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. b. 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 the example from above, the order "3&creme brulee$p" would result in a string: T3 creme brulee RUSH pastry Return this string back to kitchen (). Back inside kitchen () You need to continue creating the code for this function. Store the string returned from printout (). Print it for the user. kitchen () 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 kitchen (). You need to create this function. Once you've processed all the orders, your program can end. Clarifications The table number can be more than one digit. Therefore, don't try to get the table number by indexing the first character of the order. ● The chef type (c, g, s, or p) will always be one lowercase letter; however, don't try to index to get that either. You want to allow for flexibility in case Chef Angela adds more chef types in the future that may have two or more characters. The dish name can contain spaces. You don't have to worry about capitalization. The rest of the order will be typed in without spaces. Reminder: the user can type in as many orders as they want until they enter 'x'.
Case scenario
You have been hired at Angela's Kitchen, a restaurant in Los Angeles. Chef and owner Angela has been
asking her wait staff to take orders on paper. She would like a new system where the wait staff can type in
orders. The system should also print tickets for the kitchen staff that are easy to read so they know what
dish to make and what table it belongs to.
What your Python program should do
Your starter code should be (do not change this)
def printout(table, dish, chef):
# Finish the rest of this function
def kitchen(order):
# Finish the rest of this function
# Start your main block of code here
In the main part of your code outside of the functions
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 pl
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 kitchen ()
that takes in the order as a parameter.
Send each order to a function called kitchen (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.
Transcribed Image Text:Case scenario You have been hired at Angela's Kitchen, a restaurant in Los Angeles. Chef and owner Angela has been asking her wait staff to take orders on paper. She would like a new system where the wait staff can type in orders. The system should also print tickets for the kitchen staff that are easy to read so they know what dish to make and what table it belongs to. What your Python program should do Your starter code should be (do not change this) def printout(table, dish, chef): # Finish the rest of this function def kitchen(order): # Finish the rest of this function # Start your main block of code here In the main part of your code outside of the functions 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 pl 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 kitchen () that takes in the order as a parameter. Send each order to a function called kitchen (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.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY