Home >>Python math Module >Python math.gamma() Method
Python math.gamma() method in python is an inbuilt method and is used to the numerically computes the gamma value (factorial(x-1)) of the given argument.
Syntax:math.gamma(x)
Parameter | Description |
---|---|
x | It is required a number to find the gamma value |
import math
print (math.gamma(2))
print (math.gamma(-7.8))
import math
gamma_var = 8
print ("The gamma value of the given argument is : "
+ str(math.gamma(gamma_var)))