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
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
Trending now
This is a popular solution!
Step by step
Solved in 3 steps