randomInt#
Return a random integer number
Available in: math cells, REPL.
Syntax#
randomInt(max)
randomInt(min, max)
randomInt(size)
randomInt(size, max)
randomInt(size, min, max)
Arguments and behavior#
Upper bound is exclusive. The example checks range and integer type instead of predicting the draw. The example returns scalar (boolean).
Example#
Edit the inputs, then use Run or Reset. Changes stay in this example.
Example
randomInt(1,7) >= 1 and randomInt(1,7) < 7Interactive examples could not load. You can still copy the expressions.
Expected result: true.