livepython.net

37. Python Program to Find the Quotient and Remainder

EasyNumbers

Overview

Use floor division and the remainder operator.

Problem Statement

There are 17 sweets and 5 friends. Store both numbers in variables, then print how many sweets each friend gets and how many are left over, exactly like this:

Each friend gets 3 sweets
2 sweets are left over

Input

No input is required for this question.

Output

Each friend gets 3 sweets
2 sweets are left over

Learn this firstChapter 5 · Python Numbers: int, float and Math Operators
solution.py
# write your code here

EXPECTED OUTPUT

1Each friend gets 3 sweets
22 sweets are left over

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.