all parms random randomize randomize_vs_shuffle total
There are main 3 ways for randomizing, a sequence (random), an option (randomly) and an action (randomize)
The sequence 'random'
|
HTML
|
RESULT
|
{sequence random, rows=25, minimal=10, maximal=50 } {$sequence} {/sequence}
|
21 23 41 45 24 19 19 40 23 27 46 36 16 22 21 45 42 12 10 44 28 24 47 50 34
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
24 22 11 16 27 25 41 37 44 30 10 21 35 19 13 26 28 36 43 14 29 48 42 45 20
|
The sequence option 'randomly'
Here the loop index is randomly set before the sequence is executed.
|
HTML
|
RESULT
|
{sequence power=2, rows=10, randomly, from=8, to=16} {$sequence} {/sequence}
|
16384 8192 1024 16384 4096 32768 256 16384 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
383 181 271 547 337 197 47 739 307 829
|
The sequence action 'randomize'
|
HTML
|
RESULT
|
{sequence from=10, to=20, push='mySeq'}
|
|
{mySeq} {$sequence} {/mySeq}
|
10 11 12 13 14 15 16 17 18 19 20
|
{mySeq randomize } {$sequence} {/mySeq}
|
15 17 18 13 20 12 19 10 14 11 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 18 17 14 12
|
|