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

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 ti

How can we solve please help me

21st Sep 2022, 8:14 AM
Kifayatullah Hamid
Kifayatullah Hamid - avatar
7 Answers
+ 3
Find 20% of bill amount. Print result. see hints , read full description
21st Sep 2022, 8:15 AM
Jayakrishna 🇮🇳
+ 2
If you still need help after Jayakrishna's advice, copy your code and add it to the code playground, then attach it here.
21st Sep 2022, 10:10 AM
Ausgrindtube
Ausgrindtube - avatar
+ 2
bill = int(input()) print(bill*20/100) https://code.sololearn.com/c1nVBfG9qyzM/?ref=app
22nd Sep 2022, 2:17 AM
Fathima Shazana Naleem
+ 1
Having the answer, simply "so" isn't the best way to learn. Imagine never taking your first step (and falling over). You'd never walk nor learn to.
21st Sep 2022, 4:33 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
Kifayatullah Hamid It just one line of code. You need to understand, how to take input.. and how to find some percentage..? Both are explained well in lesson with examples. Why you waiting for answer since a day...? Any time, try yourself first. and post your attempt to get further help. find x% of y by : y * x/100 Accept input by : input() function. If you need integer input, convert to int by int() as int("10") int( input() ) Hope it helps to understand..
22nd Sep 2022, 8:35 AM
Jayakrishna 🇮🇳
- 1
No sir please write the code
21st Sep 2022, 2:40 PM
Kifayatullah Hamid
Kifayatullah Hamid - avatar
- 1
bill = int(input()) percent=(bill*20)/100 print(percent)
21st Sep 2022, 4:06 PM
Ajit Kumar
Ajit Kumar - avatar