HOME

Leftover apples function

1) Create a FUNCTION with 2 parameters called apple & people.

Find how many apples will remain after the user shares it equally with the people and return the answer.

HINT: Your arguments should be the number of apples and number of people. Use MOD to find the remainder.

2) Ask the user how many apples did they buy and how many people are they sharing it with.

Use the function you have created, passing these values as parameters and then printing out the answer

Construct a pseudocode answer by drag&dropping and reordering lines from the left to the right.

Jumble the blocks! Try your code!