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

0 points
about 10 years

'It looks like the printed output is 50.71 instead of 54.63. Double check the instructions!'

meal = 44.50 tax = 0.0675 tip = 0.15

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

print(“%.2f” % total)

So this is the entire code when I click save&submit it say that I get 50.71 instead of 54.63 what have I done wrong. Could you correct my code explain what I have done wrong and also tell me why the corrected code is correct.

Answer 530d5d6a7c82ca78ac002301

5 votes

Permalink

Found the solution, it’s : total = meal + meal * TIP not tax, hope this helps.

points
Submitted by Jacob Wood
about 10 years

2 comments

Yorkiris about 10 years

thanks so much I didn’t read the instructions correctly but you really helped m out.

mw2dude2010 over 9 years

my man

Answer 530d76467c82caf95a00272a

2 votes

Permalink

You don’t have to enter the numbers but instead write the code total = meal + meal * tip and you will get the right answer, 54.63

points
Submitted by Julius Diaz
about 10 years

6 comments

Yorkiris about 10 years

thanks so much I didn’t read the instructions correctly but you really helped me out

EvilGeniusMedia almost 10 years

I too did not read the instructions. A couple of times when I’ve been caught out it’s because of this so thanks for making this clear.

CaptainKA over 9 years

quite an expensive meal.

JesseB.Simple over 9 years

Boy do I feel dumb : ** (

Josh McCallum about 9 years

Thank you this helped me :)

MonetAtTheCode over 8 years

help i have got 51.17

Answer 53a75c768c1ccc6a34005bc6

1 vote

Permalink

total=meal+meal*tip

points
Submitted by debor
almost 10 years

Answer 548af68a86f55260e0001836

0 votes

Permalink

I had the same exact problem. I did Tax instead of Tip also!

points
Submitted by Austin Thornley
over 9 years