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?

https://code.sololearn.com/cQTNJm91nHO8/?ref=app

11th Sep 2020, 9:06 PM
Anton
5 Answers
+ 5
Anton Did you resolve your problem?
11th Sep 2020, 10:49 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 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
11th Sep 2020, 9:17 PM
Abhay
Abhay - avatar
+ 2
Thank you!
11th Sep 2020, 9:19 PM
Anton
+ 1
Rik Wittkopp Yes I did) The problem was that I misunderstood the question)
12th Sep 2020, 8:17 AM
Anton
0
Here is the code coach that I am trying to pass https://www.sololearn.com/coach/3?ref=app
11th Sep 2020, 9:09 PM
Anton