Question: CIS 1 1 5 ch 0 2 _ lab 0 1 Complete the program below, using onlineGDB, to calculate the total cost of a meal

CIS115 ch02_lab01
Complete the program below, using onlineGDB, to calculate the total cost of a meal including
sales taxe plus a tip. The program will prompt the user to input the cost of the meal and
perform the calculations and print the results.
Sales tax rate is 8.75% and the tip is 18%, do not calculate a tip on sales tax amount.
Sample output below:
Meal cost is 25.73
Tax amount is 2.25
Tip amount is 4.63
Total cost of meal 32.61
======================== copy program below this line ========================
# student name 2024 ch02_lab01
'''
this program will accept input of a meal cost and then:
1. calculate the sales amount
2. calculate the tip amount
3. print the results to include: meal amount, tip amount, tax amount, total cost
'''
# ===================== program constants
TAX_RATE=0.0875
TIP_RATE=0.18
# =============================== data input
mealAmt=float(input('please input the amount of the meal '))
# ======================== calculations
taxAmt=mealAmt * TAX_RATE
# ============================= print results
print(f'meal cost is {mealAmt: .2f}')
print(f'tax amount is {taxAmt: .2f}')
print(f'tip amount is {tipAmt: .2f}')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!