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

0 points
Submitted by mr_nerd15
almost 9 years

is there a glitch on the tip calculator?

meal = 44.50 tax = 0.0675 tip = 0.15

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

print(“%.2f” % total)

when i hit run i get the error: it looks like meal is set too 47.50375 instead of 44.50, but i get the answer of 54.63;none. Any help?

Answer 554a3ec993767691bf000038

1 vote

Permalink

Assign the variable total on line 8!

meal = 44.50 tax = 0.0675 tip = 0.15

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

print(“%.2f” % total)

points
Submitted by kshitij tiwari
almost 9 years

Answer 551b439786f5521cc5000236

0 votes

Permalink

put a space between meal and tip and meal and tax then it should run.

points
Submitted by SaberToothDragonInc
almost 9 years