+ 2

Code coach

Could someone help me with ā€œpopsiclesā€? (It’s a case from code coach) My code is: siblings = int(input()) popsicles = int(input()) x = (popsicles//siblings) y = (popsicles - x) print("eat them yourself", x) print("give away", y) I can’t understand what I did wrong :( What’s in incorrect? Maybe I didn’t get what was the goals in this case ….

16th Feb 2023, 3:06 PM
АлексанГра БонГаренко
АлексанГра БонГаренко - avatar
2 Answers
+ 4
Task Goal is print "give away" if popsicles can be evenly distributed to siblings, otherwise print "eat them yourself".
16th Feb 2023, 3:21 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
Jayakrishna šŸ‡®šŸ‡³ oh, probably I just haven’t learn how to make this statement (if can be evenly distributed). Thanks!!!
16th Feb 2023, 3:32 PM
АлексанГра БонГаренко
АлексанГра БонГаренко - avatar