I am having problem in tip calculator program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

I am having problem in tip calculator program

It's showing different and wrong output but in calculator it's showing correct

23rd May 2021, 12:15 PM
Soham Dengale
11 Answers
+ 8
Your 2nd solution is correct. But it's not necessary to add extra things in your solution. I mean don't add anything inside input() bill = int(input())
23rd May 2021, 12:38 PM
Simba
Simba - avatar
+ 1
bill = int(input(268)) #your code goes here tip = (bill*20/100) print (float(tip))
23rd May 2021, 12:34 PM
Soham Dengale
+ 1
Thanks it worked
23rd May 2021, 12:55 PM
Soham Dengale
+ 1
Soham Dengale for the safety/tidy of Q&A, could you mark as best answer the relevant one?
23rd May 2021, 3:58 PM
visph
visph - avatar
+ 1
Sure
24th May 2021, 4:23 AM
Soham Dengale
0
bill = int(input(268)) #your code goes here tip = (bill%20) print (float(tip))
23rd May 2021, 12:33 PM
Soham Dengale
0
Or
23rd May 2021, 12:33 PM
Soham Dengale
0
Output is 26853.6
23rd May 2021, 12:35 PM
Soham Dengale
0
It should be 53.6
23rd May 2021, 12:35 PM
Soham Dengale
0
Means
23rd May 2021, 12:36 PM
Soham Dengale
0
Thanks to you guys for response
24th May 2021, 4:31 AM
Soham Dengale