0

Having trouble with tip calculator

Not getting a good 'solved' with this. Bill= int(input(25.0)) Tip= bill*20/100

12th Oct 2022, 3:37 PM
tony cardella
tony cardella - avatar
3 Respostas
+ 2
Oh. You may miss understood the usage of input() function. It is used to accept input from the console. It is not output statement. The print() function is used to output the text on the output console or stream.. So you have take input by input() function then process on this input data. Find result. Then output result by using print() function.. Revise lessons of input(), print() functions.. The argument to input() is just a prompt message or hint to the user. Ex: x = int( input("Enter a number")) so dont put anything in code coaches.
12th Oct 2022, 6:36 PM
Jayakrishna 🇮🇳
+ 3
Capital B : Bill in declaration but using small b in bill. Don't put anything into input() argument. Where is printing result statement?
12th Oct 2022, 3:53 PM
Jayakrishna 🇮🇳
0
If i put nothing in the input() the result is output expected 25.0 for test 1 and 53.6 for test 2 - my output for both is 0. If i put 25.0 for input(25.0) then it passes the first test but not 2nd. I also dont put a print command in there anywhere.
12th Oct 2022, 3:59 PM
tony cardella
tony cardella - avatar