+ 6

# Help in code

đ„Č I,am unable to solve the code challenge "popsicle" using python can someone tell me about the solution actually there are two ecceptences and both requires different outputs at the same time Here's the code siblings = 3 popsicles = 9 #your code goes here sum = (int(popsicles) / int(siblings)) if sum == 3: print("give away") elif sum != 3: print("eat them yourself")

25th Jul 2024, 1:31 AM
FREEZO â
12 Respostas
+ 5
the link given from Chris Coder is working properly on android devices.
25th Jul 2024, 12:09 PM
Lothar
+ 5
Do (popsicles%sibling) you will get the remainder and if remainder is equal to 0 print giveaway else eat them yourself easy~ if (popsicles%siblings==0): print("give away") else: print("eat them yourself")
25th Jul 2024, 1:56 PM
ăEtheră
+ 3
What were the challenge instructions again?
25th Jul 2024, 2:36 AM
Wilbur Jaywright
+ 2
FREEZO You should use % for remainder. You want to find if there are any left overs. So you're looking for a remainder. If there is no remainder give away, else eat them yourself
25th Jul 2024, 3:32 AM
Chris Coder
+ 1
Chris Coder âŠhe did. Right in the question body.
25th Jul 2024, 3:01 AM
Wilbur Jaywright
25th Jul 2024, 3:16 AM
Chris Coder
+ 1
Chris Coder Iâll just assume you had a goid point here. Unfortunately, that link takes me to my phoneâs home screen.
25th Jul 2024, 4:13 AM
Wilbur Jaywright
+ 1
Anushkaâš throwing unexplained code at someone is the worst thing you can do here. Now theyâre just going to throw that in the editor and NOT LEARN ANYTHING! Congratulations, you stole the lesson from them, the whole reason they are using Sololearn in the first place. Edit: I see someone else already told you this, and you acted fairly humble and like you received it, but you left your original post! You should delete it.
26th Jul 2024, 11:46 AM
Wilbur Jaywright
+ 1
Idris Alim Start your own post so you can get all the attention that you need.
26th Jul 2024, 10:21 PM
Chris Coder
0
I need help
26th Jul 2024, 10:05 PM
Idris Alim
0
Create a timer program that will take yje number of second as input and coundown to 0
27th Jul 2024, 4:22 AM
Idris Alim
0
27th Jul 2024, 4:50 AM
Idris Alim