# Python random Functions

EditRocket provides the following information on random functions in the Python source code builder.

betavariate(alpha, beta) - Beta distribution.

choice(seq) - Return a random element from the non-empty sequence seq.

expovariate(lambd) - Exponential distribution.

gammavariate(alpha, beta) - Gamma distribution.

gauss(mu, sigma) - Gaussian distribution.

getrandbits(k) - Returns a python long int with k random bits.

getstate() - Return an object capturing the current internal state of the generator.

jumpahead(n) - Change the internal state to one different from and likely far away from the current state.

lognormvariate(mu, sigma) - Log normal distribution.

normalvariate(mu, sigma) - Normal distribution.

paretovariate(alpha) - Pareto distribution.

randint(a, b) - Return a random integer N such that a <= N <= b.

random() - Return the next random floating point number in the range [0.

randrange([start,] stop[, step]) - Return a randomly selected element from range(start, stop, step).

sample(population, k) - Return a k length list of unique elements chosen from the population sequence.

seed([x]) - Initialize the basic random number generator.

setstate(state) - state should have been obtained from a previous call to getstate(), and setstate() restores the internal state of the generator to what it was at the time setstate() was called.

shuffle(x[, random]) - Shuffle the sequence x in place.

uniform(a, b) - Return a random real number N such that a <= N < b.

vonmisesvariate(mu, kappa) - mu is the mean angle, expressed in radians between 0 and 2*pi, and kappa is the concentration parameter, which must be greater than or equal to zero.

weibullvariate(alpha, beta) - Weibull distribution.

whseed([x]) - This is obsolete, supplied for bit-level compatibility with versions of Python prior to 2.