+ 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

19th Jan 2020, 2:15 PM
Dunder
Dunder - avatar
33 ответов
+ 11
s=int(input()) p=int(input()) print('give away' if p%s==0 else 'eat them yourself')
20th Jan 2020, 11:47 AM
Saroj Patel
Saroj Patel - avatar
+ 7
siblings = int(input()) popsicles = int(input()) if popsicles%siblings==0: print("give away") else: print ("eat them yourself")
19th Jan 2020, 5:33 PM
George Pavlov
George Pavlov - avatar
+ 6
Dunder you should not show this link. May be someone can modify your code and run it.
19th Jan 2020, 2:59 PM
Lothar
Lothar - avatar
+ 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
20th Jan 2020, 5:14 PM
ugochukwu Joseph
ugochukwu Joseph - avatar
+ 6
It would be great if you show us your try. It will let you know where you re going wrong.
21st Jan 2020, 2:11 PM
Manoj
Manoj - avatar
+ 3
Ok,then Have fun
19th Jan 2020, 4:27 PM
Mavi Sakal
+ 3
siblings = int(input()) popsicles = int(input()) #your code goes here if popsicles % siblings == 0: print("give away") else: print("eat them yourself")
21st Jan 2020, 7:54 AM
Joshua Evuetapha
Joshua Evuetapha - avatar
+ 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.
19th Jan 2020, 3:12 PM
Aymen
+ 2
Why did you divide the result to 2
19th Jan 2020, 4:19 PM
Mavi Sakal
+ 2
Could you find the answer?
19th Jan 2020, 4:21 PM
Mavi Sakal
+ 1
Guys can you help me solve the test case number 5?
19th Jan 2020, 3:14 PM
Dunder
Dunder - avatar
+ 1
Dunder which language ?
19th Jan 2020, 3:19 PM
Aymen
+ 1
yessine that's python sir, please check the link if you dont mind me saying
19th Jan 2020, 3:20 PM
Dunder
Dunder - avatar
+ 1
Dunder Okay. The link leads to MY solutions. Only you can open your code coach solutions. What exactly is your difficulty?
19th Jan 2020, 3:22 PM
Aymen
+ 1
Can i post here my code? the last test case i cant solve it yessine
19th Jan 2020, 3:22 PM
Dunder
Dunder - avatar
+ 1
Dunder yes, since it's not a correct solution, no problem.
19th Jan 2020, 3:23 PM
Aymen
+ 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
19th Jan 2020, 3:25 PM
Dunder
Dunder - avatar
+ 1
Dunder It looks to me that you didn't understand the problem, so can you tell me what you understood from the task?
19th Jan 2020, 3:27 PM
Aymen
+ 1
Dunder What did you understand from the word "even" ?
19th Jan 2020, 3:28 PM
Aymen
+ 1
"even" here is not the opposite of odd.
19th Jan 2020, 3:29 PM
Aymen