(SOLVED) Python for beginners | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

(SOLVED) Python for beginners

When you go out to eat, you always tip 20% of the bill amount. But whoā€™s got the time to calculate the right tip amount every time? Not you thatā€™s for sure! Youā€™re making a program to calculate tips and save some time. Your program needs to take the bill amount as input and output the tip as a float. Sample Input 50 Sample Output 10.0

1st Jun 2022, 8:11 AM
Fidel Bola
9 Respostas
+ 1
bill = int(input()) bill = (int(50*20)/100) print(float(bill))
1st Jun 2022, 8:37 AM
Fidel Bola
+ 1
print(int(input())*.2)
1st Jun 2022, 10:13 AM
JoĆ£o GonƧalves
+ 1
Simple X = input() Print ((20/100)*x);
2nd Jun 2022, 12:29 AM
Abinash Saikia
Abinash Saikia - avatar
0
Lol. Thanks. I will do that now
1st Jun 2022, 8:41 AM
Fidel Bola
0
Ok. Thanks
1st Jun 2022, 9:22 AM
Fidel Bola
0
It's solved already. Thanks
1st Jun 2022, 10:15 AM
Fidel Bola
0
X=int(input() Print(x*20/100)
2nd Jun 2022, 4:58 PM
Sayeed
Sayeed - avatar
0
You can do: tip = 0.2 basebill = int(input("Enter Price:")) finalbill = basebill*tip print("The total of the tip is:" , float(finalbill))
3rd Jun 2022, 3:35 AM
Jay
0
Hi guyz
3rd Jun 2022, 5:51 AM
Abali Henry