Python | sympy.gamma() method
Last Updated :
07 Jul, 2019
With the help of
sympy.gamma() method, we can find the
gamma function in SymPy. gamma(z) represents
which for positive integer z is the same as
.
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:
from sympy import *
Z = 5
print ( "Z = {}" . format (Z))
gamma_Z = gamma(Z)
print ( "gamma(Z) : {}" . format (gamma_Z))
|
Output:
Z = 5
gamma(Z) : 24
Example #2:
from sympy import *
X = symbols( 'x' )
print ( "X = {}" . format (X))
gamma_X = gamma(X)
print ( "gamma(X) : {}" . format (gamma_X))
|
Output:
X = x
gamma(X) : gamma(x)
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...