Tip calculation. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Tip calculation.

Hello everyone! Can you assist me with tip calculation , l am very stuck and struggling. Here is a bit of what l manged to write. bill = int(input(50)) #your code goes here tip = bill * 0.2 print(tip) But everytime l run the code it's telling me That the input is 125 and the expected out put is 25.0 but on the question it's written Sample input 50 Sample out put 10 Please help me to understand.

16th May 2021, 4:18 PM
Su Mi.
Su Mi. - avatar
4 Answers
+ 2
Hey Su Mi , don't give input as 50 . bill = int(input()) print(bill*0.2)
16th May 2021, 4:26 PM
Giriraj Yalpalwar
Giriraj Yalpalwar - avatar
+ 1
Hi! no, the sample can be used, but not by you. your task is to write a universal program, for any case
16th May 2021, 5:58 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Thank you, iii l was having a really hard time.
16th May 2021, 6:01 PM
Su Mi.
Su Mi. - avatar
0
Thank you so much🤗, so when they wrote sample it was for example not necessarily to be used?
16th May 2021, 5:46 PM
Su Mi.
Su Mi. - avatar