About Lesson
divmod():-
Divmod() built-in function combines division and modulus operations into a single function call that returns the pair (quotient, remainder) as a tuple.
Example:-
print(divmod(10,3)) def main(): a=int(input(“enter first value”)) b=int(input(“enter Second value”)) print(“Quotient and Remainder are “,divmod(a,b)) main()
|
output (3, 1) enter first value35 enter Second value3 Quotient and Remainder are (11, 2) |