- 1

Answer the below

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 Attempt:- Bill=int(input (50*20/100) Print(bill)

5th Feb 2021, 2:01 PM
mOnika
mOnika - avatar
5 Réponses
+ 5
Show is your attempt please.
5th Feb 2021, 2:04 PM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
+ 1
bill = int(input()) bill = 125 tips = (bill*20)/100 print(tips) i solve the first test and then enter the value of the second test in the above code, the first test got wrong. Don't know what to do?
2nd Jun 2021, 2:18 AM
Muhammad Khan
Muhammad Khan - avatar
0
TRY THIS bill = int(input()) print(float((bill / 100) * 20)) #your code goes here
5th Feb 2021, 2:15 PM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
0
U need to do casting change it with float .
5th Feb 2021, 2:57 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
∆BH∆Y I didn't get the answer yet
6th Feb 2021, 7:21 AM
mOnika
mOnika - avatar