+ 5
Help
I cant solve the test case number 5, please help me im new to programming https://www.sololearn.com/coach/3?ref=app
33 ответов
+ 11
s=int(input())
p=int(input())
print('give away' if p%s==0 else 'eat them yourself')
+ 7
siblings = int(input())
popsicles = int(input())
if popsicles%siblings==0:
print("give away")
else:
print ("eat them yourself")
+ 6
Dunder you should not show this link. May be someone can modify your code and run it.
+ 6
Python don't need complex code so the simplest way i used for that is just 2 lines of code.
msg = "give away" if popsicles% siblings == 0 else "eat them yourself"
print(msg)
Try it
+ 6
It would be great if you show us your try. It will let you know where you re going wrong.
+ 3
Ok,then Have fun
+ 3
siblings = int(input())
popsicles = int(input())
#your code goes here
if popsicles % siblings == 0:
print("give away")
else:
print("eat them yourself")
+ 2
Lothar Actually no.. Links to code coach open solutions made by the one who clicked, not solutions made by the one who wrote the link.
+ 2
Why did you divide the result to 2
+ 2
Could you find the answer?
+ 1
Guys can you help me solve the test case number 5?
+ 1
Dunder which language ?
+ 1
Dunder Okay. The link leads to MY solutions. Only you can open your code coach solutions.
What exactly is your difficulty?
+ 1
Can i post here my code? the last test case i cant solve it yessine
+ 1
Dunder yes, since it's not a correct solution, no problem.
+ 1
siblings = int(input())
popsicles = int(input())
#your code goes
result = popsicles / siblings
if result % 2 != 0:
print ('eat them yourself')
else:
print('give away')
Here yessine
+ 1
Dunder It looks to me that you didn't understand the problem, so can you tell me what you understood from the task?
+ 1
Dunder What did you understand from the word "even" ?
+ 1
"even" here is not the opposite of odd.