Tip Calculator need help on this one python for begineers it wont work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Tip Calculator need help on this one python for begineers it wont work

bill = int(input("enter your bill amount")) meal = float(input("enter your meal amount: ")) tip = int(input("enter your tip %: ")) tax = .06

15th Apr 2021, 7:46 PM
☯【 x e n o z 】☯
☯【 x e n o z 】☯ - avatar
5 Answers
+ 2
Instead of entering your bill amount use "int(input())" And write meal as "x" And lastly tip as "20/100*bill" this will calculate percentage of tip Use this code it will work 👇 bill = int(input()) x=float(20/100*bill) print (x)
17th Apr 2021, 8:25 AM
~Nandita~
~Nandita~ - avatar
+ 2
Well you dont have it printing any text or doing any calculations. In other words you just have it take user input
15th Apr 2021, 9:25 PM
Random Nameless Coder
Random Nameless Coder - avatar
+ 1
You have user input. Actions with which you do not perform.
15th Apr 2021, 9:26 PM
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ - avatar
+ 1
You're going to need to do some multiplication there.
15th Apr 2021, 11:38 PM
Myk Dowling
Myk Dowling - avatar
+ 1
#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))
25th Apr 2021, 9:48 AM
Jackson Kairani Maina
Jackson Kairani Maina - avatar