Write a 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, and then calculate the amount of a 15 percent tip and 7 percent sales tax. Display each of these amounts and the total.
charge = float(input('Enter the amount you were charged. $'))
tip = charge*.18
tax = charge*.07
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))