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

Please any one can do it

25th Oct 2021, 1:35 PM
Billa Chandu
47 Respuestas
+ 32
bill = int(input()) x=20 y=100 tip=(bill*int(x)/int(y)) print(float(tip))
6th Feb 2022, 6:35 AM
_Selenophile_
_Selenophile_ - avatar
+ 4
bill = int(input()) x=20 y=100 tip=(bill*int(x)/int(y)) print(float(tip))
29th Jun 2022, 2:35 PM
B Thanuja
B Thanuja - avatar
+ 3
Jolen Mascarenhas , as i understand, the code has to be in python? Billa Chandu , no, we will not do it for you! to get useful help from the community,  we need to see your attempt first. without having seen your code, it is difficult to find out where the issue is. => please put your code in playground and link it here thanks!
25th Oct 2021, 2:02 PM
Lothar
Lothar - avatar
+ 3
Lauren Baeza , you have posted a statement that looks like that you have an issue. it would be better if you create a new post with a question and a description about your problem. please mention the programming language, the tutorial and the lesson name and number. you should also link your code here. thanks!
29th Aug 2022, 1:59 PM
Lothar
Lothar - avatar
+ 2
I'll give u a start.... Declare 2 variables example a, b Take the total bill amount from the user n store it in a Find the percentage 0.2*a and store in b Print b That's it
25th Oct 2021, 2:10 PM
Jolen Mascarenhas
+ 2
bill=int(input()) print (bill*20 / 100)
5th May 2022, 10:42 AM
Dmitriy
+ 1
#include <stdio.h> int main() { int amt; float ans; printf("enter the total amount\n"); scanf("%d", &amt); ans=0.2*amt; printf("You have to tip %f",ans); return 0; }
25th Oct 2021, 1:57 PM
Jolen Mascarenhas
+ 1
Oh ...😅
25th Oct 2021, 2:04 PM
Jolen Mascarenhas
+ 1
I guess that's too simple 😝
25th Oct 2021, 2:04 PM
Jolen Mascarenhas
+ 1
Hmmm show me Ur program
25th Oct 2021, 2:06 PM
Jolen Mascarenhas
26th Oct 2021, 7:26 PM
Sam ツ
+ 1
Using def () may confuse comprehension for Billa Chandu, because he must be a beginner
26th Oct 2021, 7:33 PM
ola Scar
ola Scar - avatar
+ 1
@Varshni Ramdhani , please don't post in someone else's thread, please create your own. otherwise you will hardly get an answer.
23rd Jun 2022, 6:00 AM
Lothar
Lothar - avatar
+ 1
Thanks to allah finally i did it this tip calculater question. Given tip = 20% of bill so we dont use any number except this 20% because they need the method not the mathmatical issue. So look at below and give me follow my account name is Mohamed Osman bill = int(input()) tip = bill * 20/100 print(float(tip))
30th Jun 2022, 5:50 PM
Mohamed Osman
+ 1
Alright....so I figured out it doesn't actually want you to input the actual numbers in the problem except for the percentage. Wow. I read that problem over and over. How incredibly confusing and frustrating
3rd Sep 2022, 6:25 AM
Lauren Baeza
Lauren Baeza - avatar
+ 1
Q. 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. answer is bill = int(input()) x=20 y=100 tip=(bill*int(x)/int(y)) print(float(tip)) for more doubt solving contact on this channel by telegram https://youtu.be/tOWQqOWieE4
17th Nov 2022, 5:19 AM
RAJVEER SINGH BAIRWA
RAJVEER SINGH BAIRWA - avatar
+ 1
bill = int(input()) #your code goes here tip = bill * 20/100 print(float(tip))
24th Nov 2022, 4:00 PM
Mary Favour
Mary Favour - avatar
+ 1
bill = int(input()) x=20 y=100 tip=(bill*int(x)/int(y)) print(float(tip))
28th Feb 2023, 6:24 AM
sahith p
sahith p - avatar
0
Make amt as float n not int My bad🤦😅
25th Oct 2021, 1:58 PM
Jolen Mascarenhas
0
I think first u should give it a try
25th Oct 2021, 2:05 PM
Jolen Mascarenhas