Python _ how to reassign in a single line


On line 7, reassign meal to the value of itself + itself * tax. And yes, you’re allowed to reassign a variable in terms of itself!
We’re only calculating the cost of meal and tax here. We’ll get to the tip soon.
meal = 44.50
tax = 6.75 / 100
tip = 15.0 / 100

Anybody please help me…


instructions: On line 7, reassign meal to the value of:

tax = itself + itself * tax

now lets look at your code:

tax = 6.75 / 100

now lets translate this to the instructions:

tax = tax

the whole itself + itself * is missing? We can update a variable by assigning itself (current value) + what we want to add


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