+ 1

Popsicles problem?

4th Apr 2020, 9:51 AM
NIDH
6 Antworten
0
First show your attempt than we will help you in your code.We couldn't write on your behalf. So try yourself first and than ask about your confusion in code
4th Apr 2020, 10:05 AM
Muhammad Bilal
Muhammad Bilal - avatar
0
siblings = int(input()) popsicles = int(input()) print ('give away' if popsicles % siblings ==0 else 'eat them yourself') only your logic is wrong you have to take popsicles%siblings as I mentioned.Rest of your code is right. Working now
4th Apr 2020, 10:14 AM
Muhammad Bilal
Muhammad Bilal - avatar
- 1
I want the solution for the popsicles problem in python language
4th Apr 2020, 10:03 AM
NIDH
- 1
siblings = int(input()) popsicles = int(input()) print ('give away' if siblings % popsicles ==0 else 'eat them yourself')
4th Apr 2020, 10:06 AM
NIDH
- 1
siblings = int(input()) popsicles = int(input()) #your code goes here if popsicles % siblings == 0: print('give away') else: print('eat them yourself')
4th Apr 2020, 11:07 AM
Tuguldur (Төгөлдөр)
Tuguldur (Төгөлдөр) - avatar
- 3
What is your question? Explain your question and use relevants tags for more calarity.
4th Apr 2020, 9:58 AM
Muhammad Bilal
Muhammad Bilal - avatar