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*2 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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*2

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

2nd Nov 2021, 4:33 PM
Prince Tamoli
Prince Tamoli - avatar
7 Answers
0
print(int(input())*.2) #or print(float(input())*.2)
2nd Nov 2021, 5:16 PM
SoloProg
SoloProg - avatar
+ 4
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 Is any one knows how to find the answer ?
19th Sep 2022, 12:38 PM
Noorullah
Noorullah - avatar
+ 2
Your attempt
2nd Nov 2021, 5:15 PM
MATOVU CALEB
MATOVU CALEB - avatar
+ 2
bill = int(input()) #your code goes here tip=(bill*20)/100 print(tip)
15th Dec 2022, 2:34 AM
Gopi Chand Ganipisetty
Gopi Chand Ganipisetty - avatar
+ 2
Bill=int(input()) Tip=float(bill*20/100) Print(tip)
28th Mar 2023, 12:46 PM
Asma Sulthana
Asma Sulthana - avatar
0
Gcgcgcyf
11th Jun 2022, 11:30 AM
Gousya Famina
- 1
Print(int(input())*.2) #or Print(float(input())*.2)
10th Jul 2022, 12:19 PM
M Kalyani