num.divmod(numeric) â array
Instance Public methods
Returns an array containing the quotient and modulus obtained by dividing
num by numeric. If q, r = x.divmod(y), then
q = floor(x/y)
x = q*y+r
The quotient is rounded toward -infinity, as shown in the following table:
a | b | a.divmod(b) | a/b | a.modulo(b) | a.remainder(b)
------+-----+---------------+---------+-------------+---------------
13 | 4 | 3, 1 | 3 | 1 | 1
------+-----+-