next | previous | forward | backward | up | top | index | toc | directory | Macaulay 2 web site

random(ZZ,ZZ) -- random integer in a range

Synopsis

Description

i1 : for i to 10 list random(100,200)

o1 = {175, 147, 167, 172, 197, 159, 199, 109, 111, 179, 154}

o1 : List
i2 : tally apply(100, i -> random(10,15))

o2 = Tally{10 => 22}
           11 => 9
           12 => 18
           13 => 21
           14 => 17
           15 => 13

o2 : Tally

See also