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

0 points
Submitted by L33tCookie
almost 10 years

"The Total"

Got stuck on it and this is how I got it to work. If this is wrong and there is a correct way post it below!

Assign the variable total on line 8!

meal = 47.505 tax = 0.0675 tip = 0.15

meal = meal + meal * tax total = 47.505 + 47.505 * .15

print(“%.2f” % total)

Answer 536da1e37c82ca46f8000757

2 votes

Permalink

I believe your “total” code is wrong… Look below,

Assign the variable total on line 8!

meal = 47.505 tax = 0.0675 tip = 0.15

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

print(“%.2f” % total)

You should get 54.63

points
Submitted by Rudy Trevino
almost 10 years

3 comments

robojukie almost 10 years

the first time the variable ‘meal’ is set, it should be to 44.50 not 47.505

Rudy Trevino almost 10 years

Correct. 44.50 is meal before tax, I used 47.505 from his example. My main objective was that I think the total should be written in code like so ==> total = meal + meal * tip , rather than ==> total = 47.505 + 47.505 * .15 BUT I’m still learning too so my apologies if I’m wrong.

doctor_boy almost 10 years

Thanks!

Answer 5360982b80ff33cc77000482

1 vote

Permalink

i get 54.62 but not 63

points
Submitted by Rojan111
almost 10 years

Answer 53609f80282ae30324000ff6

0 votes

Permalink

aaaa I found answer

Assign the variable total on line 8!

meal = 44.50 tax = 0.0675 tip = 0.15

meal = meal + meal * tax total = 47.51 + 47.50 * 0.15

print(“%.2f” % total) get 54.63 anwer

points
Submitted by Rojan111
almost 10 years