Snack bar menu Write a program in phyton that allows the user to choose from the following menu until he/she chooses to exit. The program should keep a running total of the charges and then add 6% sales tax to calculate the final bill. Display the total to the user. 1) Personal Pizza $6.00 2) Pretzel $2.50 3) Chips $1.25 4) Hot Dog $3.75 5) Exit Input validation: The user must choose 1 - 5 from the menu. Example Output: Welcome to Yum Yum Snack Bar! Please choose from the following menu: 1) Personal Pizza $6.00 2) Pretzel $2.50 3) Chips $1.25 4) Hot Dog $3.75 5) Exit Enter your choice here: 1 Current total: $6.00 Please choose from the following menu: 1) Personal Pizza $6.00 2) Pretzel $2.50 3) Chips $1.25 4) Hot Dog $3.75 5) Exit Enter your choice here: 3 Current total: $7.25 Please choose from the following menu: 1) Personal Pizza $6.00 2) Pretzel $2.50 3) Chips $1.25 4) Hot Dog $3.75 5) Exit Enter your choice here: 8 Invalid choice. Must choose 1 – 5. Try again. Please choose from the following menu: 1) Personal Pizza $6.00 2) Pretzel $2.50 3) Chips $1.25 4) Hot Dog $3.75 5) Exit Enter your choice here: 4 Current total: $11.00 Please choose from the following menu: 1) Personal Pizza $5.95 2) Pretzel $2.50 3) Chips $1.25 4) Hot Dog $3.75 5) Exit Enter your choice here: 5 Current total: $11.00 Sales Tax: $0.66 Total Bill: $11.66 Have a nice day

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

Snack bar menu

Write a program in phyton that allows the user to choose from the following menu until
he/she chooses to exit. The program should keep a running total of the charges
and then add 6% sales tax to calculate the final bill. Display the total to the
user.
1) Personal Pizza $6.00
2) Pretzel $2.50
3) Chips $1.25
4) Hot Dog $3.75
5) Exit
Input validation: The user must choose 1 - 5 from the menu.
Example Output:
Welcome to Yum Yum Snack Bar!
Please choose from the following menu:
1) Personal Pizza $6.00
2) Pretzel $2.50
3) Chips $1.25
4) Hot Dog $3.75
5) Exit
Enter your choice here: 1
Current total: $6.00
Please choose from the following menu:
1) Personal Pizza $6.00
2) Pretzel $2.50
3) Chips $1.25
4) Hot Dog $3.75
5) Exit
Enter your choice here: 3
Current total: $7.25
Please choose from the following menu:
1) Personal Pizza $6.00
2) Pretzel $2.50
3) Chips $1.25
4) Hot Dog $3.75
5) Exit
Enter your choice here: 8
Invalid choice. Must choose 1 – 5. Try again.
Please choose from the following menu:
1) Personal Pizza $6.00
2) Pretzel $2.50
3) Chips $1.25
4) Hot Dog $3.75
5) Exit
Enter your choice here: 4
Current total: $11.00
Please choose from the following menu:
1) Personal Pizza $5.95
2) Pretzel $2.50
3) Chips $1.25
4) Hot Dog $3.75
5) Exit
Enter your choice here: 5
Current total: $11.00
Sales Tax: $0.66
Total Bill: $11.66
Have a nice day

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Graphical User Interface
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,