Python | sympy.divmod() method
With the help of sympy.divmod()
method, we can find the modulus and quotient of the given values.
Syntax: sympy.divmod(val1, val2) Return: (quotient, modulo)
Example #1 :
# import sympy from sympy import * # Using sympy.divmod() method gfg = divmod (Integer( 48 ), Integer( 7 )) print (gfg) |
Output:
(6, 6)
Example #2 :
# import sympy from sympy import * # Using sympy.divmod() method gfg = divmod ( 48.2 , Integer( 7 )) print (gfg) |
Output:
(6, 6.2)
Contact Us