Ask Question
1 May, 19:44

Write a program that calculates the total amount of a meal purchased at a restaurant by a customer. The program should ask the user to input the charges of the food, then calculate the amounts of a 18% tip and 7 % sales tax. Display each of these amounts and total charges.

+1
Answers (1)
  1. 1 May, 20:36
    0
    Python script is given below

    Explanation:

    charge = float (input ('Enter the amount you were charged. $'))

    #setting the formula for tip and tax

    tip = charge*.18

    tax = charge*.07

    #printing the values

    print ('Charge for the food: %.2f' % charge)

    print ('The tip amount: %.2f' % tip)

    print ('Tax amount: %.2f' % tax)

    print ('Total amount: %.2f' % (charge+tip+tax))
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a program that calculates the total amount of a meal purchased at a restaurant by a customer. The program should ask the user to ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers