Tip Calculator (Python 3) | Sololearn: Learn to code for FREE!

+1

Tip Calculator (Python 3)

Hey, I've been teying to figure out the tip calculator problem. I can't get it, here's my progress so far: ----- bill = int(input()) print(float(bill * 20 // 100)) -----

3/19/2021 8:59:07 PM

Aron

8 Answers

New Answer

+6

#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))

+1

Answer is bill = int(input()) #your code goes here x = 20 #tip percentage y = 100 #overrall percentage #calculates the tip amount tip = (bill * int(x))/int(y) print(float(tip))

+1

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

0

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

bill = float(input("How much was the meal? ")) fifteen = ((bill / 100) * 15) eightteen = ((bill / 100) * 18) twenty = ((bill / 100) * 20) total1 = (fifteen + bill) total2 = (eightteen + bill) total3 = (twenty + bill) print("\nA 15% tip is $", fifteen) print("With tip your total is $", total1) print("\nAn 18% tip is $", eightteen) print("With tip your total is $", total2) print("\nA 20% tip is $", twenty) print("With tip your total is $", total3)

0

bill = int(input()) #your code goes here print(float(bill*20/100))

-2

Hello it tried replicating the code but am not prompted to give the input

-3

hi! you use the integer division operator // instead of the normal one /