This forum is now read-only. Please use our new forums! Go to forums
Tip Calculator Code
I need help with knowing what I did wrong. This is my code: meal = 44.50 tax = 0.0675 tip = 0.15 total = meal+meal*tip
Answer 55c5fa3f9113cb54bb000148
0 votes
the question requires you to reassign the original variable ‘meal’ - replace ‘total’ with ‘meal’ and the exercise should recognise your answer as valid. It’s a very particular reason for not passing, considering the code is correct but I guess it’s all about the attention to small details!
Answer 55caaac7d3292f5d71000127
0 votes
This is how it worked for me
meal = 44.50 tax = 0.0675 tip = 0.15
total = meal + meal*tax
total_cost = total + total*tip
print total_cost
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
1 comments
Thanks!