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 :
from sympy import *
gfg = divmod (Integer( 48 ), Integer( 7 ))
print (gfg)
|
Output:
(6, 6)
Example #2 :
from sympy import *
gfg = divmod ( 48.2 , Integer( 7 ))
print (gfg)
|
Output:
(6, 6.2)
Last Updated :
26 Aug, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...