Question
Please Debug this Python Exercise for me . I am having allot of issues with it. # Program that calculates the total amount of a
Please Debug this Python Exercise for me . I am having allot of issues with it.
# Program that calculates the total amount of a meal
# purchased at a restaurant.The program should ask the user
# to enter the charge for the food, then calculate the amount
# of a 18 percent tip and 7 percent sales tax.Display each of
# these amounts and the total formatted with two decimal places.
TAX_RATE = 0.07
TIP_RATE = 0.18
food = float(input("Enter the charge for food: ")
tip = food * TIP_RATE
tax = food * TAX_RATE
total = food + tip + tax
print ("Tip: $", format(tip, '2f'))
print ("Tax: $", format(tax, '2f'))
print ("Total: $", format(total, '2f'))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started