This forum is now read-only. Please use our new forums! Go to forums
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
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
Answer 5554bfe79376763de9000396
Answer 554d163086f5525e540004ae
Answer 553a4afe86f55267710003d4
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
1 comments
stfu just tell us
Answer 554a432595e3785f47000140
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!
1 comments
thanks you made me realise a mistake i did in the 4/5 exercise
Answer 55686610d3292fd1a700000a
You have done it alright, just put the words instead of numeric values. That’s it!
Answer 558409c39113cb82ce000554
meal = 44.50 tax = 0.0675 tip = 0.15 total = 54.63
meal = meal + meal * tax Total = meal + meal * tip
print(“%.2f” % total)
Answer 55512138e39efef5f7000330
On line #8 i just put “total = 54.63” and it said “Congratulations, you have finished this course, so maybe you should try that.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
Thank you for your answer. I am past that at the current point. Just one question what does nett mean.
why nett? they ask you to do meal.