/  Divmode() method in Python Built in Function

Divmode() method in Python Built in Function

 

Divmode method in built in function returns the remainder and quotient when one argument is divided by the second argument.

 

Syntax:

divmode(a,b)

 

Parameter

  1. Divmode has two parameters.
  2. Both the parameters are non-complex numbers. One is numerator while the other one is denominator.

 

Example-1:

 

Divmode using intergers

x = divmod(10, 2)
print(x)

 

Output:

Divmode () method in Python Built in Function

 

Example-2:

Divmode using floating numbers

x = divmod(10.8, 2)
print(x)

 

Output:

Divmode () method in Python Built in Function