+ 2

Help! 20 Code Project, Tip Calculator, Python for Beginners

I can make the first text case, but I can't make to the second Text case. Please help!

11th Jul 2021, 11:27 AM
Aysu
4 ответов
+ 5
Like this bill = int(input()) tip = bill*20/100 print(tip)
11th Jul 2021, 12:18 PM
Simba
Simba - avatar
+ 5
You need to write a code that will work for any input, not just that one test case. You can declare bill as input variable to take the input from the compiler , then manipulate what you get into what you need to output. bill = int(input())
11th Jul 2021, 11:28 AM
Simba
Simba - avatar
+ 1
I got it now, thank you so much :)
11th Jul 2021, 12:50 PM
Aysu
0
My code: bill = int(input()) bill = 125*20/100 print(bill) I just wrote a code for one test case. I don't know writing a code that will work for any input. :/
11th Jul 2021, 11:36 AM
Aysu