Question: please answer this Q using python3...thanks Sweets Left Over Task Assume that there are ten children in a group. Write a Python script named sweets-left-over.py

please answer this Q using python3...thanks
please answer this Q using python3...thanks Sweets Left Over Task Assume that
there are ten children in a group. Write a Python script named
sweets-left-over.py which reads a number of sweets (an integer) and outputs the

Sweets Left Over Task Assume that there are ten children in a group. Write a Python script named sweets-left-over.py which reads a number of sweets (an integer) and outputs the number of sweets left over after the sweets have been given to the children, Each child receives the most sweets possible such that each child receives the same number of sweets. Example input 1 30 Example output 1 0 There are no sweets left over after each child receives three sweets. Example input 2 45 Example output 2 5 There are five sweets left over after each child receives four sweets Value or Zero Task Write a Python script named odd-value-or-zero.py which reads and integer (n, say) and: if n is odd, then outputs the value n, or if n is even, then outputs just 0. Example input 1 3 Example output 1 3 nis odd, so output n itself. Example input 2 4 Example output 2 0 n is even, so output 0. Even Value or Zero Task Write a Python script named even-value-or-zero.py which reads and integer (n, say) and: if n is even, then outputs the value n, or ifnis odd, then outputs just 0. (This is the same as the previous task, except the other way around.) Example input 1 3 Example output 1 0 Example input 2 4 Example output 2 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!