+ 1

What do they mean by "To determine the quotient and remainder of a division, use the floor division and modulo operators, ..."?

To determine the quotient and remainder of a division, use the floor division and modulo operators, respectively. Floor division is done using two forward slashes. The modulo operator is carried out with a percent symbol (%). These operators can be used with both floats and integers.

14th Jan 2019, 3:57 PM
Mike
2 ответов
+ 3
With floor division you determine, how often the 3 fits whole into 13: 13 // 3 == 4 With modulo you determine what will be left after that: 13 % 4 == 1
14th Jan 2019, 4:09 PM
HonFu
HonFu - avatar
0
: )
14th Jan 2019, 4:13 PM
Mike