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

0 points
Submitted by Echaite
over 9 years

Tip is not supposed to be calculated based on the meal + tax!

When calculating tip, you’re not supposed to calculate it based on the “total” (meal + tax), you’re supposed to calculate it pre-tax!

Answer 53ecf38952f86318f700232e

0 votes

Permalink

Maybe not, but that is how Codecademy wants you to do it, so…. you have to do it :)

points
Submitted by Anonymous
over 9 years

2 comments

Echaite over 9 years

Haha. You raise a good point! I’m just being a pain. :)

EddieCodeJam over 9 years

As a server I can say that good tippers tip with tax included. They also tip 18% minimum!

Answer 53f9b7838c1ccc7f2e006073

0 votes

Permalink

I typed this code–>meal = 44.50 tax = 0.0675 tip = 0.15

total = meal + meal * tax

print(“%.2f” % total)

but no work

points
Submitted by Himanchal Sharma
over 9 years

1 comments

kevin over 9 years

you forgot the tip. meal = meal +(meal * tax) total = meal + (meal * tip)

Answer 540d61a9548c35be6d00b4bb

0 votes

Permalink

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

Oops, try again. It looks like meal is 47.9543125 instead of 47.50375.

How to get the right answer??

points
Submitted by Pooja Sarin
over 9 years

Answer 540f4e909c4e9d8963001150

0 votes

Permalink

I got it It should be total = meal + (tip * meal) on the line 8.

points
Submitted by yingying cho
over 9 years