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)

8th Feb 2023, 12:43 PM
Brandon Tafara
2 odpowiedzi
+ 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
8th Feb 2023, 12:49 PM
Ireneo language
0
can you give more info?
8th Feb 2023, 12:48 PM
Ireneo language