Python Popsicles please help | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Python Popsicles please help

This is what I created siblings = int(input()) popsicles = int(input()) answer = popsicles % siblings if(answer == 1): print("eat them yourself") else: print("give away") It's not working

25th Jul 2022, 5:18 PM
Olwethu Shezi
1 Réponse
+ 3
Suppose you have 3 siblings and 5 popsicles. 2 popsicles would ve left and you'd eat all popsicles yourself. However in your current code, you only eat them when you have exactly 1 left over.
25th Jul 2022, 5:27 PM
Lisa
Lisa - avatar