Reassign in a Single Line


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

meal = 44.5
tax = 0.0675
tip = 0.15



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.


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