Python | sympy.core() method Last Updated : 17 Sep, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.core() method, we can calculate the core_t(n) of a positive integer n. core(n, t) calculates the t-th power free part of n. If n’s prime factorization is : n = \prod_{i=1}^\omega p_i^{m_i} then core_t(n) = \prod_{i=1}^\omega p_i^{m_i \mod t} Syntax: core(n, t=2) Parameter: n - It denotes an integer. t - It denotes an integer(optional). Default for t is 2. Returns: Returns the t-th power free part of n. Example #1: Python3 # import core() method from sympy from sympy.ntheory.factor_ import core n = 24 k = 2 # Use core() method core_n_k = core(n, k) print("core({}, {}) = {} ".format(n, k, core_n_k)) Output: core(24, 2) = 6 Example #2: Python3 # import core() method from sympy from sympy.ntheory.factor_ import core n = 11**4 k = 3 # Use core() method core_n_k = core(n, k) print("core({}, {}) = {} ".format(n, k, core_n_k)) Output: core(14641, 3) = 11 Comment More infoAdvertise with us Next Article Python | sympy.core() method R rupesh_rao Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.compare() method With the help of sympy.compare() method, we can compare the variables and it will return 3 values i.e -1 for smaller, 0 for equal and 1 for greater by using sympy.compare() method. Syntax : sympy.compare() Return : Return the value of comparison i.e -1, 0, 1. Example #1 : In this example we can see 1 min read Python | Sympy Circle() method In Simpy, the function Circle() is used to make circle from a center and a radius, from three non-collinear points, or the equation of a circle. Syntax: Circle() Parameters: center : Point and radius : number or sympy expression or points : sequence of three Points or equation : equation of a circle 1 min read Python | sympy.gcd() method With the help of sympy.gcd() method, we can find the greatest common divisor of two numbers that is passed as a parameter in the sympy.gcd() method. Syntax : sympy.gcd(var1, var2) Return : Return value of greatest common divisor. Example #1 : In this example we can see that by using sympy.gcd() meth 1 min read Python | sympy.csc() method With the help of sympy.csc() method, we are able to find the value of cosine theta using sympy.csc() function. Syntax : sympy.csc() Return : Return value of cosine theta. Example #1 : In this example we can see that by using sympy.csc() method, we can find the value of cosine theta. Python3 1=1 # im 1 min read Python | sympy.eye() method With the help of sympy.eye() method, we can find the identity matrix by using sympy.eye() method. Syntax : sympy.eye() Return : Return an identity matrix. Example #1 : In this example, we can see that by using sympy.eye() method, we are able to find identity matrix having dimension nxn, where n will 1 min read Like