0
Trying tip calculator,where am I wrong??
bill=int(input(50)) x=20 y=100 tip=x/y tip(bill*x/y) print(tip)
2 Antworten
+ 3
There are several issues with your code. Firstly, you are using the wrong syntax when trying to calculate the tip. You should use the '*' operator instead of the '/' operator. Secondly, you are trying to call the 'tip' variable as a function which it is not. Lastly, you are not printing the result of the tip calculation.
The corrected code should look like this:
bill = int(input(50))
x = 20
y = 100
tip = x/y
tip_amount = bill * tip
print(tip_amount)
in this case I'm guessing that the tip is 20 percent
0
can you give more info?