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

0 points
Submitted by DaniellaSegal
almost 9 years

problem 5/5 - Did you create a variable called total?

meal = 44.50 tax = 0.0675 tip = 0.15

meal = meal + mealtax Total = meal + mealtip

print(“%.2f” % total)

What have I done wrong?

Answer 554aa1dee39efeb60c0001e9

1 vote

Permalink

Hi, I have done it this way: meal = 44.50 tax = 0.0675 tip = 0.15

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

print total my result is 44.9505625 Not sure is that correct. Looking at above answers I have my doubts.

I was looking at the above and it struck me that I made basic maths error. Last line should be total = (meal + nett) * tip +meal

points
Submitted by m1ner
almost 9 years

2 comments

birdy240 almost 9 years

Thank you for your answer. I am past that at the current point. Just one question what does nett mean.

TheiaCoding almost 9 years

why nett? they ask you to do meal.

Answer 5554bfe79376763de9000396

1 vote

Permalink

I have no idea :/

points
Submitted by Camden Harkness
almost 9 years

Answer 554d163086f5525e540004ae

0 votes

Permalink

You need to actually figure out the answer and then put in the numbers. I believe the answer is 54. something.

points
Submitted by birdy240
almost 9 years

Answer 553a4afe86f55267710003d4

-1 votes

Permalink

Mistakes are as follows

On line 5: meal = meal + meal ? tax . Something should be there you should know it!! on line 6: Total = meal + meal ? tip. on line 8: print(“%.2f” % total)

Does the total on 6 - Total on 8 match each other

points
Submitted by Karthi Keyan
almost 9 years

1 comments

Gabe Newell almost 9 years

stfu just tell us

Answer 554a432595e3785f47000140

-1 votes

Permalink

Hi, Daniella Segal

Try This:

meal = 44.50 tax = 0.0675 tip = 0.15

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

print(“%.2f” % total)

Good Luck!

points
Submitted by kshitij tiwari
almost 9 years

1 comments

Josef almost 9 years

thanks you made me realise a mistake i did in the 4/5 exercise

Answer 55686610d3292fd1a700000a

-1 votes

Permalink

You have done it alright, just put the words instead of numeric values. That’s it!

points
Submitted by srikanth nandakumar
almost 9 years

Answer 558409c39113cb82ce000554

-1 votes

Permalink

meal = 44.50 tax = 0.0675 tip = 0.15 total = 54.63

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

print(“%.2f” % total)

points
Submitted by Buwaneka De Silva
almost 9 years

Answer 55512138e39efef5f7000330

-2 votes

Permalink

On line #8 i just put “total = 54.63” and it said “Congratulations, you have finished this course, so maybe you should try that.

points
Submitted by HyperVenom37
almost 9 years