**New course!**Every coder should learn

**Generative AI!**

0

# I didn't get the quotient and remainder part

2 Answers

+ 4

Quotient & Remainder are basic Math logics
See this example, you must have done that in school
5
--------
4 | 22
| 20
--------
2
If you divide 22 by 4
your quotient is 5
and remainder is 2
While in programming in python we use (//) for getting quotient or whole number value while dividing
and (%) for remainder
22 // 4 = 5 (To get Quotient)
22 % 4 = 2 (To get remainder )

+ 1

For example:
42 // 9 is 4 (the quotient)
42 % 9 is 6 (the remainder)
because 42 is 9*4 + 6, and 0<=6<9.