0

How i solve test case #1 and #2 together to get output correct

bill = int(input()) #2 x=int(268) print(x*20/100) y= int(125) print(y*20/100)

30th Sep 2021, 10:52 AM
Amisha Amisha
10 Answers
+ 1
bill = int(input()) #your code goes here tiprate = 0.2 #20% tips = bill*tiprate print (tips)
2nd Oct 2021, 10:13 AM
Vivek Kumar Agrahari
Vivek Kumar Agrahari - avatar
+ 6
Amisha Amisha , before we are going to help you, please present your attempt here. if you haven't done a try by yourself so far, please do so. create your code in playground and post the link to it here. please also provide a proper task description with sample of input and output. thanks!
30th Sep 2021, 10:54 AM
Lothar
Lothar - avatar
+ 2
Amisha Amisha Looking at your 2 posts, I think you are looking for a 20% tip on a bill. bill = int(input) print(bill * 0.2) This does not take into consideration any rounding that may be required as I do not have access to all the info. Let us know how you go
30th Sep 2021, 11:20 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Amisha Amisha , do you mean Tip Calculator code project? If so, it's really not that hard. You firstly need to get input from user, with input() function. Then you are required to print 20% of the inputted number using print() function. (number*0.2) where number is an inputted number. If you will have any further difficulties please post your attempt here, so we could show you what you did wrong.
30th Sep 2021, 11:21 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 2
Aleksei Radchenkov Lothar Details of Amisha Amisha code attempt here bill = int(input()) #2 x=int(268) print(x*20/100) y= int(125) print(y*20/100)
30th Sep 2021, 11:22 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Amisha Amisha , u don't, bill = int(input()) Gets input from user (or in this case from Sololearn) And then by print(bill*0.2) You print output based on the input you got....
30th Sep 2021, 11:29 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
Your question is incomplete.. Could you please specify the problem you have trouble with and attach your attempt?
30th Sep 2021, 10:55 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
0
I put the value but there are two test cases at one time how i get two outputs at same time
30th Sep 2021, 11:27 AM
Amisha Amisha
0
There are two test cases first input is 125 and other 268
30th Sep 2021, 11:28 AM
Amisha Amisha
0
I got output 25.0 and 53.6
30th Sep 2021, 11:29 AM
Amisha Amisha