Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 18 percent tip and 7 percent sales tax. Display each of these amounts and the total.

Attached are images of what i have so far. Im only stuck on the last part of the code where i need to call the total.image text in transcribedimage text in transcribed

Assignment8Part1.py - C:/Users/Main/Documents/Schoolio/Fall 2018/IS 115 Intro ToProgra.. File Edit Format Run Options Window Help #Get the charged amount. charge-float (input ('Enter the amount you were charged. $') #Apply the tip and tax. tip- charge*. 18 tax= charge* .07 #Display the amounts. 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) Ln: 11 Col: 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago