+ 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 ⚓
FREEZO       ⚓ - avatar
12 Respostas
+ 6
the link given from Chris Coder is working properly on android devices.
25th Jul 2024, 12:09 PM
Lothar
Lothar - avatar
+ 6
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〕
〔Ether〕 - avatar
+ 4
What were the challenge instructions again?
25th Jul 2024, 2:36 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
+ 3
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
Chris Coder - avatar
+ 2
Chris Coder 
he did. Right in the question body.
25th Jul 2024, 3:01 AM
Wilbur Jaywright
Wilbur Jaywright - avatar
+ 2
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
Wilbur Jaywright - avatar
+ 2
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
Wilbur Jaywright - avatar
+ 2
Idris Alim Start your own post so you can get all the attention that you need.
26th Jul 2024, 10:21 PM
Chris Coder
Chris Coder - avatar
+ 1
I need help
26th Jul 2024, 10:05 PM
Idris Alim
Idris Alim - avatar
+ 1
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
Idris Alim - avatar
+ 1
27th Jul 2024, 4:50 AM
Idris Alim
Idris Alim - avatar