#Define dictionary containing all menu items and their corresponding cost
#All costs are pre-Covid because no way we're getting prices this low anymore
menu = {"burger": 13.99,
"wings": 9.50,
"fries": 5.50,
"chips": 1.99,
"soda": 2.99,
"cookie": 1.99,
"salad": 9.99}
#Sets the total cost of cart to 0 dollars
total = 0
Menu:
-------------------------------
burger $3.99
wings $3.5
fries $2.5
chips $1.99
soda $0.99
------------------------------------
cost of: burger
$3.99
#Print cost of items without tax
print("Cost of items: " + str(total))
#Print total cost of items including tax
print("Tax: " + str(round(0.0725*total, 2)))
#Prompt user, asking for tip percentage for our amazing employees because they are so great
tip = input("Enter tip amount here: ")
#Make sure there aren't any percent symbols before adding to total
tip = tip.replace('%', '')
#Multiply percentage tip to find how much the stingy customer is tipping
tipval = (float(tip)*.01)*total
#Print how much the tip comes out to be
print("Tip: " + str(round(float(tipval), 2)) + " (" + tip + "%)")
#Print the total cost of the customer's amazing meal and experience
print("Total: " + str(round(1.0725*total, 2) + round(float(tipval), 2)))
Cost of items: 3.99
Tax: 0.29
Tip: 0.6 (15%)
Total: 4.88