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?
3 Réponses
+ 1
Write a line in if "(popsicles % siblings == 0 or siblings % popsicles == 0)". Output: give away.
+ 1
You also need to write popsicles=int(input()) instead of popsicles=20 and siblings=int(input()) instead of siblings=10.
+ 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):