0
How to give two diffrent outputs for tip calculator in python project
I am unable to give two different outputs in same program There are two test cases I am not able to give the answer for both at same time
5 Antworten
+ 6
You need to use input function
+ 3
Anshul Sharma here you go...
bill = int(input())
print(bill*20/100
+ 2
Where your code?
+ 2
#Acts like a vacuum for user to input the bill amount
bill = int(input())
x = 20 #tip percentage
y = 100 #overrall percentage
#calculates the tip amount
tip = (bill * int(x))/int(y)
print(float(tip))
0
Scarlet Witch the tip calculator in python for beginners