Important Notice:

Course Content
The Calendar Module
Library Function/Predefined Functions
0/4
Sys Module
Library Function/Predefined Functions
0/2
OS Module
Library Function/Predefined Functions
0/2
Functions in Python (Chapter-10) M3-R5
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)

error: Content is protected !!