Reassign in a Single Line


#1



https://www.codecademy.com/courses/python-beginner-GB6hM/0/4?curriculum_id=4f89dab3d788890003000096#


Oops, try again. It looks like meal is 44.5 instead of 47.50375.


meal = 44.5
tax = 0.0675
tip = 0.15

meal+meal*tax


#2

The expression needs to be assigned back onto the variable, meal.

meal = meal + meal * tax

Best practices tip:

Be sure to write white space around operators so they can
be easily seen. This is a readability concern.

#3

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