Error in Total


#1

meal = 44.50
tax = 0.0675
tip = 0.150

meal = meal + meal * tip
total = 47.50 + 47.50 * 0.150

print("%.2f" % total)

it looks like the printed output is 54.62 instead of 54.63.

Can't get past it.


#2

your total should be like that...

total = meal + meal * tip


#3

Yeah that's exactly what I did. I found the total to be 54.62 and the answer is 54.63.


#4

Line 8 is suppose to be written as is
total = meal + meal * 0.15
Yea i know i had the same problem but it's good now:grin:


#5

Thank you, this helped.


#7

arcrunner84000
thank you for writing that. i didnt know it was supoosed to be written that specific way


#8

could not 4 d life in me make it work ,just put
1 line of code
print 54.63 ,eee vaulaa ,move on


#9

I tried that and it was wrong


#10

woops wrong comment!!!!!


#11

Hi try to post your code .