Tip calculator | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 3

Tip calculator

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 Explanation: 20% of 50 is 10. To calculate 20% of a given amount, you can multiply the number by 20 and divide it by 100: 50*20/100 = 10.0

22nd Feb 2022, 11:18 AM
Nikos Papadopoulos
2 Respostas
+ 1
Omg it was so simple šŸ˜­
22nd Feb 2022, 11:35 AM
Nikos Papadopoulos
0
Yeah I just had to put print(tip*20)
22nd Feb 2022, 11:31 AM
Nikos Papadopoulos