What built-in function can you use to do modulo division?
What built-in function can you use to do modulo division?
a. divint()
b. divmod()
c. modulo()
d. div()
1 Answers
b. divmod()
Explanation:
divmod(a, b)
– take two (non-complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using integer division. With mixed operand types, the rules for binary arithmetic operators apply. For integers, the result is the same as (a // b, a % b)
.