This forum is now read-only. Please use our new forums! Go to forums
"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
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
Answer 5360982b80ff33cc77000482
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
3 comments
the first time the variable ‘meal’ is set, it should be to 44.50 not 47.505
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.
Thanks!