0

Can some one explain please!

Fruit bowl test (python3) I have made the fruit bowl test and I have written is code. https://www.sololearn.com/coach/6?ref=app I passed all the 5 test cases but why? My code can't be complete haha fruit = int(input("")) cakes = fruit / 2 / 3 if cakes % 4 == 1: cakes = cakes - 1 print (int(cakes))

6th Mar 2020, 10:36 AM
Frankly Quite
Frankly Quite - avatar
3 Respuestas
+ 1
Programming 1 rule=if your code is working never touch it again.😅🤣🤣🤣
6th Mar 2020, 10:47 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
Maybe another case of this? 😁 https://www.sololearn.com/post/257905/?ref=app
6th Mar 2020, 11:07 AM
HonFu
HonFu - avatar
0
This also does the job (as the cases test for anyway): print(int(input())//6)
6th Mar 2020, 11:09 AM
HonFu
HonFu - avatar