Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

Contrast supply chain effectiveness and supply chain efficiency.

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago