I didnt get the proper ans of tip calculater can you explain it to me


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

<What do you expect to happen instead?>

```python

Replace this line with your code.

<do not remove the three backticks above>

#2

Hello, Please share your code. Then we can walk through your implementation and explain where there may be issues.

Cheers


#3

Assign the variable total on line 8!

meal = 44.50
tax = 0.0675
tip = 0.15

meal = 44.50 + 44.50 * 0.0675
total = meal +44.50*0.15

print("%.2f" % total)


#4

Tip: Use the variables you assigned above instead of the hard-coded numbers.

The instructions give you the formula using the variables.

Look at your formula. You’ve used the hard-coded original meal value of 44.50. But in the line above, that value changed as the tax was applied to it. Right?

The total is the meal + tax + tip, where tip is computed as the total including the tax.


#5

Slight change in wording…

where the tip is computed ON the total including the tax.


#6

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