TIP CALCULATOR | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

TIP CALCULATOR

Hi. I stucked on project "Tip Calculator". I can't understand how i can transfer lines to the second test. This is my code. Result be like: Test 1 āœ“. Test 2 X. Test 3 X. fee="125" tip = int(fee)*20/100 print(float(tip))

9th Feb 2022, 7:30 PM
Reagan
Reagan - avatar
1 Resposta
+ 3
xintreaa Take fee as input don't write Hard code value because inputs maybe different for different test cases. fee = input () And also no need to cast with float because / by default convert to float print(tip)
9th Feb 2022, 7:37 PM
AĶ¢J
AĶ¢J - avatar