+ 3

Popsicles Problem Python

I get error. siblings = int(input()) popsicles = int(input()) k = popsicles % siblings #your code goes here if popsicles > 0 and k = 0: print("give away") else: print("eat them yourself")

15th Jan 2020, 6:00 PM
Gürkan Sönmez
Gürkan Sönmez - avatar
7 odpowiedzi
+ 10
= is assignment you need == for comparison
15th Jan 2020, 6:03 PM
Taste
Taste - avatar
+ 3
K==0
24th Jul 2020, 3:20 PM
Shoaib Farooq
Shoaib Farooq - avatar
+ 2
You should try this.. if popsicles % siblings == 0 : print("give away") else: print("eat them yourself")
30th Jul 2020, 10:57 AM
Bhagirath Dudharejiya
+ 2
I reached this level and I'm still not getting it, help me out please siblings = int(input()) popsicles = int(input()) #your code goes here test = popsicles % siblings if test == 1: print("eat them yourself") if test == 0: print("give away")
20th Mar 2021, 4:28 PM
Mbre David
Mbre David - avatar
+ 1
Please put k==0
20th Mar 2021, 4:29 PM
Shoaib Farooq
Shoaib Farooq - avatar
+ 1
siblings = int(input()) popsicles = int(input()) #your code goes here if siblings>0: t=popsicles%siblings if t==1 or t>0.5 : print("eat them yourself") elif popsicles == siblings: print('give away') elif t%2==0: print('give away') else : print("give away") else : print("eat them yourself")
30th Aug 2022, 2:39 AM
ALI Moussa Kadjalla
ALI Moussa Kadjalla - avatar
0
Use the module operand "%" Will return 0 if the amount of siblings divided by popsicles is Even siblings = int(input()) popsicles = int(input()) if popsicles % siblings == 0: print("give away") else: print("eat them yourself")
6th Sep 2022, 9:28 PM
yonis Alvarez
yonis Alvarez - avatar