Why is this wrong?


meal= 44.5
restaurant tax = (6.75/100) * meal
tip = (15/100) * meal
total cost = meal + restaurant tax + tip

I typed this and it said that the 2nd line was wrong. But i dont understand why?


Variables cant have spaces. try restaurant_tax and also the total cost should be total_cost. along with the restaurant_tax inside of the total_cost variable



Please format your text with the code tag so we can read it easier.

The problem with line two is that you have a space in the variable restaurant tax. Variables can only have capital letters and underscores. Try restaurant_tax or restaurantTax.

You have also made the same mistake with the "total cost" variable and the "restaurant tax" variable.

Your code should end up being:

meal= 44.5
restaurant_tax = (6.75/100) * meal
tip = (15/100) * meal
total_cost = meal + restaurant_tax + tip