Challenge easy python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Challenge easy python

siblings = int(input()) popsicles = int(input()) #your code goes here if siblings %2 == 0: print("give away") else: print("eat them yourself") How I can make the output eat them yourself

10th May 2020, 10:52 PM
BlackChain
BlackChain - avatar
5 Answers
+ 3
Line 4 should be: if popsicles % siblings == 0: otherwise if you have an even number of siblings but a smaller number of popsicles the output will be wrong.
11th May 2020, 12:39 AM
Runcible
+ 4
Even has different meanings: "divisible by two without a remainder" but in this challenge it means: "equal in number, amount, or value." If you can't evenly(equally) distribute the popsicles, then eat them yourself. Everything Please carefully read above sentence again. Imagine you have 3 siblings and 6 popsicles. Then you can give away the same amount(2) of popsicles to your siblings without any remaining.
10th May 2020, 11:01 PM
Kevin ★
+ 2
Input odd numbers
10th May 2020, 10:54 PM
Mustafha Ahmad
Mustafha Ahmad - avatar
0
How do you code it
10th May 2020, 10:56 PM
BlackChain
BlackChain - avatar
0
I try Everything I use the and keywords an elif keywords but no one get the right answer
10th May 2020, 11:03 PM
BlackChain
BlackChain - avatar