?
The function divmod(a,b), where both 'a' and 'b' are integers is evaluated as:
Answer & Solution
Correct Answer:
Option
B
The correct answer is Option B: (a//b, a%b).
The divmod() function in Python returns a tuple containing the quotient and remainder when dividing 'a' by 'b', where both 'a' and 'b' are integers.
So, when evaluated, it returns (a//b, a%b), where 'a//b' represents the quotient and 'a%b' represents the remainder.
The divmod() function in Python returns a tuple containing the quotient and remainder when dividing 'a' by 'b', where both 'a' and 'b' are integers.
So, when evaluated, it returns (a//b, a%b), where 'a//b' represents the quotient and 'a%b' represents the remainder.
Join the Discussion
Login to post a comment or share your explanation.
Login