- 3

Calculate tip 20%, the bill=50, could you help me to wright the code

bill=int(input()) ?

31st Aug 2022, 2:18 PM
Tamara Danielyan
10 Answers
+ 8
#use this it will work bill = float(input()) print(bill * 20/100)
31st Aug 2022, 3:46 PM
Suparna Das
Suparna Das - avatar
+ 9
Tamara Danielyan hey I checked the question you have to read the question properly This was an example:- bill = 50 output=10.0 You have to actually make your code run all the test you are telling 25.0 because bill value entered was 125 đŸ€ŠđŸ»â€â™€ïž
31st Aug 2022, 3:46 PM
Suparna Das
Suparna Das - avatar
+ 8
If you are assuming input of bill value 50 and upon that 20% You should use the formula:- bill = float(input()) print(bill * 20/100) this is general for all the input cases but if you specifically want Bill value to be 50 then predefined bill = 50 then print the formula
31st Aug 2022, 2:22 PM
Suparna Das
Suparna Das - avatar
+ 8
Tamara Danielyan Happy to helpâ˜ș
1st Sep 2022, 3:12 AM
Suparna Das
Suparna Das - avatar
+ 6
Tamara Danielyan According to the question posted you have said 20% and bill=50 So it's 20/100 * 50 Your question says that 20% from value=50 And the output will be 10 So can you tell how you want 25.0 ? Share your question number and also the course where you are getting an error
31st Aug 2022, 3:22 PM
Suparna Das
Suparna Das - avatar
+ 1
Bill =int(input ()) X = 20 Y = 100 Tip = Bill *int(x) / int(y) Print float(tip)
1st Sep 2022, 7:10 PM
Mmecha Mmamchikerum TrustGod
0
In this case i received output 10, should be 25.0
31st Aug 2022, 2:43 PM
Tamara Danielyan
0
I receiv response that my output 10, should be 25.0
31st Aug 2022, 3:37 PM
Tamara Danielyan
0
The course is Pyton for beginners, topic 18
31st Aug 2022, 3:42 PM
Tamara Danielyan
0
Thank you much for helping me
31st Aug 2022, 4:58 PM
Tamara Danielyan