0
Help me please. I'm trying to pass popsicles code playground and pass all test except for the trird one. What am I doing wrong?
5 Answers
+ 5
Anton
Did you resolve your problem?
+ 3
if siblings % 2 == 0 and popsicles % 2 == 0:
What are you trying to achieve through this line ? I think you understood the question wrong
,You don't have to do code coaches just for the sake of passing tests ,to me code coaches are how better you understand what is being asked in the question and then implement it accordingly .
It says if Popsicles can be evenly distributed among the siblings then give away ,"evenly" doesn't means odd or even number ,say suppose there are 5 siblings and 15 Popsicles ,now if we distribute them evenly (every sibling gets the same amount each would get 3 ,as 5*3=15 ) so to check if you should give away or eat yourself something like this needs to be done =>
if number of Popsicles divided by number of siblings results in remainder being zero or the quotient being an integer not a float then you can say each siblings got equal share of Popsicles otherwise you can eat themselves
+ 2
Thank you!
+ 1
Rik Wittkopp
Yes I did) The problem was that I misunderstood the question)
0
Here is the code coach that I am trying to pass https://www.sololearn.com/coach/3?ref=app