Tip calculator problem - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Tip calculator problem (/thread-3597.html) |
Tip calculator problem - Dhaval - Jun-06-2017 Task Details : 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. # 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,)
RE: Tip calculator problem - sparkz_alot - Jun-06-2017 Seems to work fine for me. Perhaps a problem with the testing software?
|