This forum is now read-only. Please use our new forums! Go to forums
is there a glitch on the tip calculator?
meal = 44.50 tax = 0.0675 tip = 0.15
meal = meal + meal * tax total = meal + meal * tip
print(“%.2f” % total)
when i hit run i get the error: it looks like meal is set too 47.50375 instead of 44.50, but i get the answer of 54.63;none. Any help?
Answer 554a3ec993767691bf000038
1 vote
Assign the variable total on line 8!
meal = 44.50 tax = 0.0675 tip = 0.15
meal = meal + meal * tax total = meal + meal * tip
print(“%.2f” % total)
Answer 551b439786f5521cc5000236
0 votes
put a space between meal and tip and meal and tax then it should run.
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