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)
10 Answers
+ 1
bill = int(input())
#your code goes here
tiprate = 0.2 #20%
tips = bill*tiprate
print (tips)
+ 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!
+ 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
+ 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.
+ 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)
+ 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....
+ 1
Your question is incomplete.. Could you please specify the problem you have trouble with and attach your attempt?
0
I put the value but there are two test cases at one time how i get two outputs at same time
0
There are two test cases first input is 125 and other 268
0
I got output 25.0 and 53.6