+ 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")
12 ответов
+ 6
the link given from Chris Coder is working properly on android devices.
+ 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")
+ 4
What were the challenge instructions again?
+ 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
+ 2
Chris Coder …he did. Right in the question body.
+ 2
Chris Coder I’ll just assume you had a goid point here. Unfortunately, that link takes me to my phone’s home screen.
+ 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.
+ 2
Idris Alim Start your own post so you can get all the attention that you need.
+ 1
I need help
+ 1
Create a timer program that will take yje number of second as input and coundown to 0
+ 1
In python