HomeLanguagesPython | sympy.cofactors() method

Python | sympy.cofactors() method

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.




# import sympy
from sympy import *
  
# Using sympy.cofactors() method
gfg = cofactors(6, 8)
  
print(gfg)


Output :

( 2, 3, 4 )

Example #2 :




# import sympy
from sympy import *
  
# Using sympy.cofactors() method
gfg = cofactors(34, 81)
  
print(gfg)


Output :

( 1, 34, 81 )

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32727 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
7105 POSTS0 COMMENTS
Nicole Veronica
12244 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12329 POSTS0 COMMENTS
Shaida Kate Naidoo
7220 POSTS0 COMMENTS
Ted Musemwa
7479 POSTS0 COMMENTS
Thapelo Manthata
7200 POSTS0 COMMENTS
Umr Jansen
7176 POSTS0 COMMENTS