Python | sympy.gamma() method

With the help of sympy.gamma() method, we can find the gamma function in SymPy. gamma(z) represents 

Syntax: gamma(Z)
Parameters:
Z – It is the input value to the gamma function.Returns: Returns the gamma function result of the input value.
Example #1:
| # import sympy  fromsympy import* Z =5print("Z = {}".format(Z))   # Use sympy.gamma() method  gamma_Z =gamma(Z)        print("gamma(Z) : {}".format(gamma_Z))    | 
Output:
Z = 5 gamma(Z) : 24
Example #2:
| # import sympy  fromsympy import* X =symbols('x') print("X = {}".format(X))   # Use sympy.gamma() method  gamma_X =gamma(X)        print("gamma(X) : {}".format(gamma_X))    | 
Output:
X = x gamma(X) : gamma(x)
 
				 
					


