0
Tip calculator
I wrote a code and output is ok. Bt code is wrong. bill = float(input("Enter your bill:")) print(bill) tip = float(input("Enter your tip %: ")) tip_amount = bill * 20 / 100 print(tip_amount)
4 odpowiedzi
+ 1
Youtuber
How output is OK if code is wrong?
You just have to print result so remove whatever you have written in input() and also change to int from float.
+ 1
# ok
X= thanks
Print(x)
0
Youtuber the code prompts for input of the tip percentage and then uses a hard-coded value of 20 instead of the tip variable.