10 Réponses
+ 12
It's simple. First you need to create a variable and assign integer input to it. You can make the input expect an integer by changing it to int (input ()).
Isn't 20% equal to 20/100 or 0.2?
You can use "*" to multiply variables containing numbers.
You can use print () to print the output.
By the way, I gave some hints. Try to finish it yourself. Show your try if you can't solve it anymore.
+ 5
Are you telling about the code coach problem of python course?
+ 4
finally i got to know how to solve a code for simple tip calculator
we should use a variable x
that works as a bill
and then we should use bill input as int so
x=int(input())
but we want tip in float so the output will be in float
for 20% tip on a bill we can calculate by using this formula
20/100
float=x*20/100
and finally we have to print this code
print(float)
the output will be in float
and this code helps to solve any integer bill amount :)
x=int(input())
float=x*20/100
print(float)
+ 3
I m getting for only one output in one time but it's have 3 input together
So how can I give 3 inputs together
Please help
+ 2
i dont get the format they are asking for
0
Yes
0
Phenomenal
To get the 20% of a value, just multiply it to 0.2
Example:
40 * 0.2 ---> 8
If you have errors in your code, please share with us so we may help. Thanks.
0
Please show me the code solution.
0
Can I get the code for it
0
The input is supposed to be 125 right?