0
Operator issue
When you go out to eat, you always tip 20% of the bill amount. But whoâs got the time to calculate the right tip amount every time? Not you thatâs for sure! 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 Name= int(input()) Thatâs the program any idea how to solve?
10 Respostas
+ 2
Hey, pls show your attempt here that we can help...
Happy Coding..
+ 2
Sara_889 Bill=int(input("enter your bill amount"))
Tip=Bill*20/100
print (float (Tip))đ
+ 2
Sara_889 I can't understand your code
Answer is zero correct due to you use modulus
Operator
That's use as
9%5 will give 4
12%2 will give 0
+ 1
Thanks you just solved my isue i still begginer and facing some obstacles đ
+ 1
Sara_889 your welcome
Keep learning đđ
If any problem occurred during learning or coding just message me, I'll help as possible..
0
Explanation: 20% of 50 is 10.
To calculate 20% of a given amount, you can multiply the number by 20 and divide it by 100: 50*20/100 = 10.0
This is the question?
0
bil= int(input())
x= 100
x *= 10
x %=50
Print(x)
0
bill = int(input())
#your code goes here
x= 100
x *= 100
x %=10
print(x)
Still my output zero
0
Here's the code:
print(int(input())/5)
# Hope this helps
0
bill = int(input())
print(float((bill / 100) * 20))