+ 1
On python
i just completed phyton 3 on this platform and decided to put my learning to practice but am finding it completely difficult especially using the code coach please i need help
5 Answers
+ 2
Ok. You need to be a little bit more specific.
+ 2
As I remember the input lines are already there as template. You just have to take care of the output depending on these two values.
You can post here your try until now and we will try to help you.
Also you can use the search bar as these problems were discused before on the q&a section.
+ 1
What would you do if you were to fall in such a situation in real life. How would you solve it? Take your time and think about the steps you would take. Then try and express the steps in code. After you have attempted and still failed, you can ask the community to help with your attempted code.
0
You have a box of popsicles and you want to give them all away to a group of brothers and sisters. If you have enough left in the box to give them each an even amount you should go for it! If not, they will fight over them, and you should eat them yourself later.
Task
Given the number of siblings that you are giving popsicles to, determine if you can give them each an even amount or if you shouldn't mention the popsicles at all.
Input Format
Two integer values, the first one represents the number of siblings, and the second one represents the number of popsicles that you have left in the box.
Output Format
A string that says 'give away' if you are giving them away, or 'eat them yourself' if you will be eating them yourself.
Sample Input
3 9
Sample Output
give away
i attempted this exercise on code coach but have no idea what am even supposed to do first
0
Here’s some code to get you started on the popsicle challenge. I left off the last couple lines (the “else” case where you eat them yourself) so you can test yourself by adding that part.
siblings = int(input())
popsicles = int(input())
if popsicles%siblings==0:
print("give away")



