 Please I need an explanation to solve this | Sololearn: Learn to code for FREE!

0

# Please I need an explanation to solve this

When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right tip amount every time? Not you that’s for sure! You’re making a program to calculate tips and save some time. Your program needs to take the bill amount as input and output the tip as a float. Sample Input 50 Sample Output 10.0

0

I had. Payment*0.2 is the key point, just like tax.

+1

I cannot see any calculation in your code, you are just printing 20 on the screen.

0

Total payment*0.2 is the tip amount, tricky point is that you need to output as float, or may be there is decimal points requirements.

0

There is no decimal point required . Thats it

0

bill = int(input()) tip = ("20") print(int("20")) I dont know where the mistake is coming from thou

0

Thats why i need more explanation, if you can

0

bill = int(input(20)) tip = (5*20\5) print(tip) It wAs said i got it but i should learn from my bug, what could be the issue

0

Tip should be calculate by bill, not a arithmetic statement. There is no operand such as \ in Python (hope I am right, since it is normal use as escape tag but VB use it as floor division), / is division and // is floor division in Python, and you need not parentheses the arithmetic statement in Python, otherwise it may become a tuple…

0

bill=int(input()) tip=((bill*20)/100) print(float(tip))