# Tip calculator problem

#1

The Meal

Now let's apply the concepts from the previous section to a real world example.

You've finished eating at a restaurant, and received this bill:

``````Cost of meal: \$44.50
Restaurant tax: 6.75%
Tip: 15%``````

You'll apply the tip to the overall cost of the meal (including tax).
Instructions

First, let's declare the variable meal and assign it the value 44.50.

Oops, try again.
It looks like meal is set to 54.6293125 instead of 44.50.

``````# Assign the variable meal the value 44.50 on line 3!

variable_meal = 44.50
variable_tax = 6.75
variable_tip = 15

print('Meal', variable_meal,)

variable_tax = (variable_meal * variable_tax / 100)

print('Tax', variable_tax,)

variable_meal_tex = ( variable_meal + variable_tax)

variable_tip = (variable_meal_tex * variable_tip / 100)

print('tip', variable_tip,)``````

#2

You just need to declare the variable " meal " and assign it the value "44.50 "

#4

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