This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Avenshura
over 8 years

What am I doing wrong??

So I’ve been stuck on the last section of the Tip Calculator for the past two days and can’t figure out what’s wrong with my code! Here it is:

meal = 44.50
tax = 0.0675
tip = 0.15

meal = meal + meal * tax
total = 44.50 + 44.50 * 0.15

print("%.2f" % total)

It gives me this error: Oops, try again. It looks like the printed output is 51.17 instead of 54.63. Double check the instructions!

I noticed many others had this problem and after experimenting with different variations of code, I’m starting to believe this course is bugged. Someone prove me wrong and tell me I’ve overlooked something extremely simple… Thanks.

Answer 55e1020686f552fc1f0001f1

-1 votes

Permalink

The value of tax is 0.0675, not 0.15 - that’s the tip - so you did overlook something simple! Good luck on your course!

points
over 8 years