Python | sympy.factorial() method Last Updated : 25 Jun, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.factorial(), we can find the factorial of any number by using sympy.factorial() method. Syntax : sympy.factorial() Return : Return factorial of a number. Example #1 : In this example we can see that by using sympy.factorial(), we are able to find the factorial of number that is passed as parameter. Python3 1=1 # import sympy from sympy import * # Using sympy.factorial() method gfg_exp = factorial(5) print(gfg_exp) Output : 120 Example #2 : Python3 1=1 # import sympy from sympy import * # Using sympy.factorial() method gfg_exp = factorial(10) print(gfg_exp) Output : 3628800 Comment More infoAdvertise with us Next Article Python | sympy.factorial() method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | sympy.factorial2() method With the help of sympy.factorial2() method, we can find the Double factorial. Double factorial of a number is given by - n!! = \begin{cases} 1 & n = 0 \\ n(n-2)(n-4) \cdots 1 & n\ \text{positive odd} \\ n(n-2)(n-4) \cdots 2 & n\ \text{positive even} \\ (n+2)!!/(n+2) & n\ \text{negati 1 min read Python | sympy.factor() method With the help of sympy.factor() method, we can find the factors of mathematical expressions in the form of variables by using sympy.factor() method. Syntax : sympy.factor(expression) Return : Return factor of mathematical expression. Example #1 : In this example we can see that by using sympy.factor 1 min read Python | sympy.factorint() method With the help of sympy.factorint() method, we can find the factors and their corresponding multiplicities of a given integer. For input less than 2, factorint() behaves as follows: factorint(1) - returns the empty factorization {}. factorint(0) - returns {0:1}. factorint(-n) - adds -1:1 to the facto 1 min read Python | sympy.factor_list() method With the help of sympy.factor_list() method, we can get a list of factors of a mathematical expression in SymPy in the form of (factor, power) tuple. Syntax: factor_list(expression) Parameters: expression - It is a mathematical expression. Returns: Returns a list of factors of the given mathematical 2 min read Python | sympy.core() method 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 - 1 min read Like