Tip Calculator

Lesson 01/05 – The Meal

 
# Assign the variable meal the value 44.50 on line 3!

meal = 44.50

Lesson 02/05 – The Tax

 
meal = 44.50
tax = 0.0675

Lesson 03/05 – The Tip

 
# You're almost there! Assign the tip variable on line 5.

meal = 44.50
tax = 0.0675
tip = 0.15

Lesson 04/05 – Reassign in a Single Line

 
# Reassign meal on line 7!

meal = 44.50
tax = 0.0675
tip = 0.15

meal = meal + meal * tax

Lesson 05/05 – The Total

 
# Assign the variable total on line 8!

meal = 44.50
tax = 0.0675
tip = 0.15

meal = meal + meal * tax
total = meal + meal * tip

print("%.2f" % total)