Assume you work as a cashier in a restaurant. You must keep track of the  amount of money your restaurant earns each day and report it to your boss.  If a customer purchases something, that amount is added to the daily income  book. Take a customer's order and if a customer enters an "X," the order is  complete, and print "Total cost of the items: ". In this way, 3 customers  can order at maximum as your restaurant only serves three customers per  day; after the service, print the day's total income; if the total money  exceeds 500tk, print "Great Work". Otherwise, print "Do Best Next Day." Note: Write a function called “take_order()” that asks users to input food  names, calculate the amount and show it to the customer. When the last  customer buys, you need to also calculate the total income of the day and  show it at the end. Assume that no customers enter invalid food names. The Dictionary ‘price_list’ is set for you and use it in the code for your  convenience. price_list={'Juice':30, 'Fried Rice':150, 'Burger':50, 'Pizza':110, 'Fried  Chicken':90, 'Noodles':70} ======================================================   Function Call 01: take_order() Sample Input_01: Please enter the name of the items: Burger Juice Pizza X Sample Output_01: Total cost: 190 Explanation 1 : The customer ordered 3 things: Burger, Juice and a Pizza.  So the cost of  the three things are added, 50+30+110= 190 and is presented  as the output. ================================================ Function Call 02: take_order() Sample Input_02: Please enter the name of the items: Burger Fried Rice Pizza X Sample Output_02: Total cost: 310 Explanation 2 : The customer ordered 3 things: Burger, Fried Rice and a  Pizza. So the cost of  the three things are added, 50+150+110= 310 and is  presented as the output. ================================================ Function Call 03: take_order() Sample Input_03: Please enter the name of the items: Pizza Noodles X Sample Output_03: Total cost:180 Total income of the day: 680 Great Work Explanation 3 : Over here, the customer ordered 2 things: Pizza and  Noodles. So the cost of  the two things are added, 110+70= 180 and is  presented as the output. The total income was 190 + 310 + 180 = 680. Since it crossed 500 tk, “Great  work” is printed.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

Assume you work as a cashier in a restaurant. You must keep track of the 
amount of money your restaurant earns each day and report it to your boss. 
If a customer purchases something, that amount is added to the daily income 
book.
Take a customer's order and if a customer enters an "X," the order is 
complete, and print "Total cost of the items: ". In this way, 3 customers 
can order at maximum as your restaurant only serves three customers per 
day; after the service, print the day's total income; if the total money 
exceeds 500tk, print "Great Work". Otherwise, print "Do Best Next Day."
Note: Write a function called “take_order()” that asks users to input food 
names, calculate the amount and show it to the customer. When the last 
customer buys, you need to also calculate the total income of the day and 
show it at the end. Assume that no customers enter invalid food names.
The Dictionary ‘price_list’ is set for you and use it in the code for your 
convenience.
price_list={'Juice':30, 'Fried Rice':150, 'Burger':50, 'Pizza':110, 'Fried 
Chicken':90, 'Noodles':70}
======================================================
  Function Call 01:
take_order()
Sample Input_01:
Please enter the name of the items:
Burger
Juice
Pizza
X
Sample Output_01:
Total cost: 190
Explanation 1 : The customer ordered 3 things: Burger, Juice and a Pizza. 
So the cost of  the three things are added, 50+30+110= 190 and is presented 
as the output.
================================================

Function Call 02:
take_order()
Sample Input_02:
Please enter the name of the items:
Burger
Fried Rice
Pizza
X
Sample Output_02:
Total cost: 310
Explanation 2 : The customer ordered 3 things: Burger, Fried Rice and a 
Pizza. So the cost of  the three things are added, 50+150+110= 310 and is 
presented as the output.

================================================
Function Call 03:
take_order()
Sample Input_03:
Please enter the name of the items:
Pizza
Noodles
X
Sample Output_03:
Total cost:180
Total income of the day: 680
Great Work
Explanation 3 : Over here, the customer ordered 2 things: Pizza and 
Noodles. So the cost of  the two things are added, 110+70= 180 and is 
presented as the output.
The total income was 190 + 310 + 180 = 680. Since it crossed 500 tk, “Great 
work” is printed.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education