0

Fruit bowl

fruit = int(input()) #your code goes here apples = fruit//2 pie = apples//3 if fruit%2 == 0: print(pie) else: print(0)

28th Jan 2024, 6:58 AM
Kaushal Mittal
Kaushal Mittal - avatar
2 ответов
+ 1
28th Jan 2024, 9:58 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Kaushal Mittal , You already made pie contain the answer. Just print it. Don't print 0 if fruit is an odd number, because there are infinite odd numbers of fruit from which you can make more than 0 pies, the lowest being 7 (makes 1 pie). fruit = int(input()) apples = fruit//2 pie = apples//3 print(pie) Here is the link for anyone who wants to read the Code Coach description. https://www.sololearn.com/coach/6?ref=app
28th Jan 2024, 11:40 PM
Rain
Rain - avatar