Tip calculator


#1



https://www.codecademy.com/courses/python-beginner-GB6hM/0/5?curriculum_id=4f89dab3d788890003000096


It looks like the printed output is 3.21 instead of 54.63. I don't know if I did something wrong or if I input the wrong numbers.


I need it to print 3.21. All help is greatly appreciated. :slight_smile:


# Assign the variable total on line 8!

meal = 44.50
tax = 0.0675
tip = 0.15

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

print("%.2f" % total)


#2

Instead of * tax you need * tip


#3

Oh thanks, I hate it when I do that lol.


#4

Yeah don't blame yourself its easy to miss. I believe I had the same problem when I was on that lesson xD Happy coding!


#5

im not good at this stuff


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.