OpenSesame
Rapunzel Code Editor
DataMatrix
Support forum
Python Tutorials
MindProbe
Supported by

random functions (random-ext)

The random-ext library is available as random. This library provides many convenient, higher-level functions for randomization.

Example:

Draw eight circle with a random color and a location that is randomly sampled from a five by five grid:

let positions = xy_grid(5, 50)
positions = random.subArray(positions, 8)
const cnv = Canvas()
cnv.fixdot()
for (const [x, y] of positions) {
    cnv.circle({x: x, y: y, r: 20, fill: true, color: random.color()})
}
cnv.show()

For an overview, see:

Supported by