This forum is now read-only. Please use our new forums! Go to forums
What am I doing wrong??
So I’ve been stuck on the last section of the Tip Calculator for the past two days and can’t figure out what’s wrong with my code! Here it is:
meal = 44.50
tax = 0.0675
tip = 0.15
meal = meal + meal * tax
total = 44.50 + 44.50 * 0.15
print("%.2f" % total)
It gives me this error: Oops, try again. It looks like the printed output is 51.17 instead of 54.63. Double check the instructions!
I noticed many others had this problem and after experimenting with different variations of code, I’m starting to believe this course is bugged. Someone prove me wrong and tell me I’ve overlooked something extremely simple… Thanks.
Answer 55e1020686f552fc1f0001f1
-1 votes
The value of tax is 0.0675, not 0.15 - that’s the tip - so you did overlook something simple! Good luck on your course!
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