Open In App

Python | sympy.cofactors() method

Last Updated : 02 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
With the help of sympy.cofactors() method, we can find the cofactors of two numbers that is passed as a parameter in the sympy.cofactors() method.
Syntax : sympy.cofactors(var1, var2) Return : Return tuple of cofactors.
Example #1 : In this example we can see that by using sympy.cofactors() method, we are able to find the cofactors of any two numbers that is passed as parameters. Python3 1=1
# import sympy
from sympy import *

# Using sympy.cofactors() method
gfg = cofactors(6, 8)

print(gfg)
Output :
( 2, 3, 4 )
Example #2 : Python3 1=1
# import sympy
from sympy import *

# Using sympy.cofactors() method
gfg = cofactors(34, 81)

print(gfg)
Output :
( 1, 34, 81 )

Next Article
Article Tags :
Practice Tags :

Similar Reads