Problem Create a cash register program for your new store: ETINUM REGRUB! Your program should contain the following functions: 1. A function that prints the main menu with the following options: [1] Choose burgers [2] Add drinks [3] Compute total and pay [0] Exit The function should return the user's choice. 2. A function for option [1] Choose burgers. The function should print the available menu items. [1] Etinum Regrub: P35.00 [2] Double Etinum Regrub: P47.00 [3] Bacon Cheese Regrub: P73.00 [4] Triple Onion Regrub: P600.00 [0] Back to main menu The user must input their choice. Note that the user can select items multiple times. When [0] is chosen, the function should return the total price of the items chosen and go back to the main menu. 3. A function for option [2] Add drinks. The function should ask the user how many drinks they want (assume a drink costs P25.50). It then should return the total price for the drinks.

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
Question

Use Python

Problem
Create a cash register program for your new store: ETINUM REGRUB! Your program should contain the
following functions:
1. A function that prints the main menu with the following options:
[1] Choose burgers
[2] Add drinks
[3] Compute total and pay
[0] Exit
The function should return the user's choice.
2. A function for option [1] Choose burgers. The function should print the available
menu items.
[1] Etinum Regrub: P35.00
[2] Double Etinum Regrub: P47.00
[3] Bacon Cheese Regrub: P73.00
[4] Triple Onion Regrub: P600.00
[0] Back to main menu
The user must input their choice. Note that the user can select items multiple times. When
[0] is chosen, the function should return the total price of the items chosen and go back to
the main menu.
3. A function for option [2] Add drinks. The function should ask the user how many drinks
they want (assume a drink costs P25.50). It then should return the total price for the drinks.
Transcribed Image Text:Problem Create a cash register program for your new store: ETINUM REGRUB! Your program should contain the following functions: 1. A function that prints the main menu with the following options: [1] Choose burgers [2] Add drinks [3] Compute total and pay [0] Exit The function should return the user's choice. 2. A function for option [1] Choose burgers. The function should print the available menu items. [1] Etinum Regrub: P35.00 [2] Double Etinum Regrub: P47.00 [3] Bacon Cheese Regrub: P73.00 [4] Triple Onion Regrub: P600.00 [0] Back to main menu The user must input their choice. Note that the user can select items multiple times. When [0] is chosen, the function should return the total price of the items chosen and go back to the main menu. 3. A function for option [2] Add drinks. The function should ask the user how many drinks they want (assume a drink costs P25.50). It then should return the total price for the drinks.
4. A function for option [3] Compute total and pay. This function should have the
total price as a parameter. Furthermore, this function should do the following:
a. Display the total price to pay.
b.
Display the total price to pay with a service charge of 7%.
i. You must use a function and return the price with a 7% additional charge.
c. Ask if the user has a PWD ID or a Senior Citizen ID (y/n).
i.
If the answer is yes, display the total price with a 20% discount.
1. You must use a function and return the price with a 20% discount.
If the answer is no, display the total price.
ii.
d. Ask the user for the amount to pay.
e.
Display the change.
Sample Run
WELCOME TO ETINUM REGRUB
MAIN MENU
[1] Choose burgers
[2] Add drinks
[3] Compute total and pay
[0] Exit
Enter choice: 1
BURGERS
[1] Etinum Regrub: P35.00
[2] Double Etinum Regrub: P47.00
[3] Bacon Cheese Regrub: P73.00
[4] Triple Onion Regrub: P600.00
[] Back to main menu
Enter your choice: 1
BURGERS
[1] Etinum Regrub: P35.00
[2] Double Etinum Regrub: P47.00
[3] Bacon Cheese Regrub: P73.00
[4] Triple Onion Regrub: P600.00
[0] Back to main menu
Enter your choice: 4
BURGERS
[1] Etinum Regrub: P35.00
[2] Double Etinum Regrub: P47.00
[3] Bacon Cheese Regrub: P73.00
[4] Triple Onion Regrub: P600.00
[] Back to main menu
Enter your choice: 0
Your current price to pay is: 635
MAIN MENU
[1] Choose burgers
[2] Add drinks
[3] Compute total and pay
[0] Exit
Enter choice: 2
Each drink costs P25.50.
How many drinks would you like to add?
Enter amount: 2
Your current price to pay is: 686.0
MAIN MENU
[1] Choose burgers
[2] Add drinks
[3] Compute total and pay
[0] Exit
Enter choice: 3
Your total is: 686.0
Your total with service charge of 7%: 734.02
Do you have a PWD ID or a Senior Citizen ID? (y/n) y
Your total with 20% discount: 587.216
Enter amount to pay: 1000
Your change is: 412.784
Thank you for shopping!
MAIN MENU
[1] Choose burgers
[2] Add drinks
[3] Compute total and pay
[0] Exit
Enter choice: 0
Goodbye!
Transcribed Image Text:4. A function for option [3] Compute total and pay. This function should have the total price as a parameter. Furthermore, this function should do the following: a. Display the total price to pay. b. Display the total price to pay with a service charge of 7%. i. You must use a function and return the price with a 7% additional charge. c. Ask if the user has a PWD ID or a Senior Citizen ID (y/n). i. If the answer is yes, display the total price with a 20% discount. 1. You must use a function and return the price with a 20% discount. If the answer is no, display the total price. ii. d. Ask the user for the amount to pay. e. Display the change. Sample Run WELCOME TO ETINUM REGRUB MAIN MENU [1] Choose burgers [2] Add drinks [3] Compute total and pay [0] Exit Enter choice: 1 BURGERS [1] Etinum Regrub: P35.00 [2] Double Etinum Regrub: P47.00 [3] Bacon Cheese Regrub: P73.00 [4] Triple Onion Regrub: P600.00 [] Back to main menu Enter your choice: 1 BURGERS [1] Etinum Regrub: P35.00 [2] Double Etinum Regrub: P47.00 [3] Bacon Cheese Regrub: P73.00 [4] Triple Onion Regrub: P600.00 [0] Back to main menu Enter your choice: 4 BURGERS [1] Etinum Regrub: P35.00 [2] Double Etinum Regrub: P47.00 [3] Bacon Cheese Regrub: P73.00 [4] Triple Onion Regrub: P600.00 [] Back to main menu Enter your choice: 0 Your current price to pay is: 635 MAIN MENU [1] Choose burgers [2] Add drinks [3] Compute total and pay [0] Exit Enter choice: 2 Each drink costs P25.50. How many drinks would you like to add? Enter amount: 2 Your current price to pay is: 686.0 MAIN MENU [1] Choose burgers [2] Add drinks [3] Compute total and pay [0] Exit Enter choice: 3 Your total is: 686.0 Your total with service charge of 7%: 734.02 Do you have a PWD ID or a Senior Citizen ID? (y/n) y Your total with 20% discount: 587.216 Enter amount to pay: 1000 Your change is: 412.784 Thank you for shopping! MAIN MENU [1] Choose burgers [2] Add drinks [3] Compute total and pay [0] Exit Enter choice: 0 Goodbye!
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Variables
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