sympy.stats.Die() function in Python Last Updated : 01 Jun, 2020 Improve Improve Like Article Like Save Share Report With the help of sympy.stats.Die() method, we can get the fair die having number of faces given by the parameter and having name defined in the parameter itself by using sympy.stats.Die() method. Syntax : sympy.stats.Die(name, faces) Return : Return a fair die having ‘n’ faces. Example #1 : In this example, we can see that by using sympy.stats.Die() method, we are able to get the fair die having ‘n’ faces passed as a parameter by using this method. # Import sympy and Die from sympy.stats import Die, density X = Die('X', 12) # Using sympy.Die() method gfg = density(X).dict print(gfg) Output : {1: 1/12, 2: 1/12, 3: 1/12, 4: 1/12, 5: 1/12, 6: 1/12, 7: 1/12, 8: 1/12, 9: 1/12, 10: 1/12, 11: 1/12, 12: 1/12} Example #2 : # Import sympy and Die from sympy.stats import Die, density X = Die('X', 3) # Using sympy.Die() method gfg = density(X).dict print(gfg) Output : {1: 1/3, 2: 1/3, 3: 1/3} Like Article Suggest improvement Previous sympy.stats.BetaNoncentral() in Python Next Python - tensorflow.raw_ops.Acosh() Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads sympy.stats.variance() function in Python sympy.stats.BetaBinomial() function in Python sympy.stats.Rademacher() function in Python sympy.stats.FiniteRV() function in Python sympy.stats.Hypergeometric() function in Python sympy.stats.Binomial() function in Python sympy.stats.Skellam() function in Python sympy.stats.Gamma() function in Python sympy.stats.Multinomial() function in Python sympy.stats.MultivariateBeta() function in Python Like J Jitender_1998 Follow Article Tags : Python SymPy-Stats Python Practice Tags : python