This forum is now read-only. Please use our new forums! Go to forums
Tip is not supposed to be calculated based on the meal + tax!
When calculating tip, you’re not supposed to calculate it based on the “total” (meal + tax), you’re supposed to calculate it pre-tax!
Answer 53ecf38952f86318f700232e
Answer 53f9b7838c1ccc7f2e006073
0 votes
I typed this code–>meal = 44.50 tax = 0.0675 tip = 0.15
total = meal + meal * tax
print(“%.2f” % total)
but no work
1 comments
kevin over 9 years
you forgot the tip. meal = meal +(meal * tax) total = meal + (meal * tip)
Answer 540d61a9548c35be6d00b4bb
0 votes
meal = meal + meal * tax + meal * tax * tip
Oops, try again. It looks like meal is 47.9543125 instead of 47.50375.
How to get the right answer??
Answer 540f4e909c4e9d8963001150
0 votes
I got it It should be total = meal + (tip * meal) on the line 8.
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
Haha. You raise a good point! I’m just being a pain. :)
As a server I can say that good tippers tip with tax included. They also tip 18% minimum!