0

In tip calculator in the last part of every lesson, how can I answer the 3 test cases? I can't make it done. Someone?

It is from variable

15th Oct 2022, 9:55 AM
Flare
Flare - avatar
8 Antworten
+ 2
Flare... In tip calculator they ask output in float So as usual dividing , (bill*20/100) Gives u output... single slash '/' will give float value No need to print float( ....) try it...
15th Oct 2022, 5:12 PM
Riya
Riya - avatar
+ 1
You did not use bill in your calculation! Use the input value in the calculation. Remove the last 4 lines. Replace 125 in the 2nd line with bill.
15th Oct 2022, 10:08 AM
Lisa
Lisa - avatar
+ 1
Remove everything but the first 2 lines. In the print(), write bill instead of 125.
15th Oct 2022, 10:13 AM
Lisa
Lisa - avatar
+ 1
Got it! Thanks
15th Oct 2022, 10:16 AM
Flare
Flare - avatar
0
You need to use the input() value. Please link your code so we can check on it.
15th Oct 2022, 10:01 AM
Lisa
Lisa - avatar
0
bill = int(input()) print (float (125 * 20 / 100)) bill = int(input()) print (float (268 * 20 / 100)) bill = int(input()) print (float (500 * 20 / 100))
15th Oct 2022, 10:06 AM
Flare
Flare - avatar
0
They are in different test case from case #1 to #3
15th Oct 2022, 10:07 AM
Flare
Flare - avatar
0
How? Sorry, I don't understand.
15th Oct 2022, 10:12 AM
Flare
Flare - avatar