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}
|
39 29 18 32 11 49 39 28 20 49 21 26 28 18 46 14 11 10 13 49 14 18 37 18 26
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
21 31 48 17 50 44 16 25 14 22 23 49 30 33 29 15 32 39 26 24 28 10 46 36 40
|
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}
|
4096 8192 16384 4096 8192 256 16384 4096 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
929 647 601 509 509 991 283 281 467 59
|
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}
|
16 18 12 15 13 10 19 17 20 11 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 19 10 16 11
|
|