0

How do I solve all test cases for popsicles problem?https://www.sololearn.com/coach/3?ref=app

I can't solve all test cases I'm a beginner pls help siblings = 10 popsicles = 20 #your code goes here if (popsicles % siblings == 0): print("give away") else: print("eat them yourself") Pls tell me what should I do?

1st Aug 2025, 4:28 PM
Elsa Cavandish
Elsa Cavandish - avatar
3 Answers
+ 1
Write a line in if "(popsicles % siblings == 0 or siblings % popsicles == 0)". Output: give away.
1st Aug 2025, 5:10 PM
Mila
Mila - avatar
+ 1
You also need to write popsicles=int(input()) instead of popsicles=20 and siblings=int(input()) instead of siblings=10.
1st Aug 2025, 5:14 PM
Mila
Mila - avatar
+ 1
Elsa Cavandish , > to follow the 2nd comment from Mila to use input() statements instead of `hard-coded` input values is ok. > the recommendation in the 1st comment to use: `(popsicles % siblings == 0 or siblings % popsicles == 0)` is not required, keep your code just as it is: => if (popsicles % siblings == 0):
1st Aug 2025, 7:22 PM
Lothar
Lothar - avatar