Your program shall, Display the menu with the prices. Take an order using the Sentinel approach. The user will input numbers between 1 and 10, according to the menu you created below Use zero as sentinel value Inform the user about invalid input values (greater than 10 or less than 0) Add the prices of the dishes ordered After taking the order, the program displays the subtotal, the sales tax (8.75%), the grand total, and a suggested 15% tip. Notice that you will still need the multi-way conditional to add the right price value to the running total of the order. import sys #Enter number for each dish and price for users DishNumber= float(input("Enter numbers between 1 and 10:")) if DishNumber == 1: print("Cajun Calamari price is $9.00") elif DishNumber== 2: print("Shrimp Cocktail price is $9.00") elif DishNumber== 3: print:("Spicy Garlic Mussels price is $9.00") elif DishNumber== 4: print("Crispy Ahi price is $10.50") elif DishNumber== 5: print("Spinach Artichoke Dip price is $8.00") elif DishNumber== 6: print("Steamed Clams price is $10.00") elif DishNumber== 7: print("Chips and Dip price is $6.50") elif DishNumber== 8: print:("Beer Battered Ribs price is $6.00") elif DishNumber== 9: print("St.Louis Ribs price is $8.00") elif DishNumber== 10: print("Mozzarella Sticks price is $7.00") else: print("Error: Select number between 1 and 10")
Your
- Display the menu with the prices.
- Take an order using the Sentinel approach.
- The user will input numbers between 1 and 10, according to the menu you created below
- Use zero as sentinel value
- Inform the user about invalid input values (greater than 10 or less than 0)
- Add the prices of the dishes ordered
- After taking the order, the program displays the subtotal, the sales tax (8.75%), the grand total, and a suggested 15% tip.
Notice that you will still need the multi-way conditional to add the right price value to the running total of the order.
import sys
#Enter number for each dish and price for users
DishNumber= float(input("Enter numbers between 1 and 10:"))
if DishNumber == 1:
print("Cajun Calamari price is $9.00")
elif DishNumber== 2:
print("Shrimp Cocktail price is $9.00")
elif DishNumber== 3:
print:("Spicy Garlic Mussels price is $9.00")
elif DishNumber== 4:
print("Crispy Ahi price is $10.50")
elif DishNumber== 5:
print("Spinach Artichoke Dip price is $8.00")
elif DishNumber== 6:
print("Steamed Clams price is $10.00")
elif DishNumber== 7:
print("Chips and Dip price is $6.50")
elif DishNumber== 8:
print:("Beer Battered Ribs price is $6.00")
elif DishNumber== 9:
print("St.Louis Ribs price is $8.00")
elif DishNumber== 10:
print("Mozzarella Sticks price is $7.00")
else:
print("Error: Select number between 1 and 10")

Step by step
Solved in 2 steps with 5 images









