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)
2 Answers
+ 1
Kaushal Mittal , look at the corrected code. Hope it helps you.
https://sololearn.com/compiler-playground/cdQ9R6Hj8VwH/?ref=app
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