VEX IQ Python API
Functions
random Namespace Reference

PyMite's random number module (only minimal support is intended) https://docs.python.org/2.6/library/random.html. More...

Functions

def randint (a, b)
 Return a random integer N such that a <= N <= b. More...
 
def random ()
 Return the next random floating point number in the range [0.0, 1.0). More...
 
def choice (seq)
 Return a random element from the non-empty sequence seq. More...
 

Detailed Description

PyMite's random number module (only minimal support is intended) https://docs.python.org/2.6/library/random.html.

Function Documentation

◆ randint()

def random.randint (   a,
  b 
)

Return a random integer N such that a <= N <= b.

◆ random()

def random.random ( )

Return the next random floating point number in the range [0.0, 1.0).

◆ choice()

def random.choice (   seq)

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

If seq is empty, raises an error.

Parameters
seqsequence to choose from (with at least 1 element)