Subversion Repositories wimsdev

Rev

Rev 5903 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3263 bpr 1
:Randomization
2
:Function,Example,Effect
3460 bpr 3
:random( .. )
3263 bpr 4
random(-5..5)
5
a random number between -5 and 5
3460 bpr 6
:randint( .. )
3263 bpr 7
randint(-5..5)
8
a random integer between -5 and 5 (inclusive)
3460 bpr 9
:shuffle( )
3263 bpr 10
shuffle(6)
11
a list of 6 integers 1,2,...,6, in a random order.
3460 bpr 12
:shuffle( , )
3263 bpr 13
shuffle(a,b,c,d,e)
5903 bpr 14
the list of letters {a,b,c,d,e}, in a random order. <span class="wims_warning">$wims_name_warning</span>, if the first word of the list is <span class="tt wims_code_words">even</span> or <span class="tt wims_code_words">odd</span>, the permutation will be respectively even or odd (so these words can not be the first word of the list to permute).
3460 bpr 15
:randomitem( )
3263 bpr 16
randomitem(\list)
17
a random item of (comma-separated) \list.
17472 lemaire 18
:randitem( )
19
randitem(1,2,3,a,b,c)
20
a random item within {1,2,3,a,b,c}
3460 bpr 21
:randomrow( )
3263 bpr 22
randomrow(\mat)
23
a random row of the matrix \mat.