Https://www.codecademy.com/courses/learn-python/lessons/tip-calculator/exercises/the-total?action=lesson_resume


#1

https://www.codecademy.com/courses/learn-python/lessons/tip-calculator/exercises/the-total?action=lesson_resume

why we did the addition of meal twice then divided with tax and tip?


#2

If you want to keep the original amount and add more to it, then you’ll end up with original_amount + extra
And in this case the thing that’s being added is based on the original amount so therefore the original amount will be mentioned when computing it

If you start out with 10 and want to add 20%, you’d do:

10 + 10 * 0.2


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.