Randomization Functions

The following list includes both WebAssign-specific and commonly-used Perl functions that are available when creating questions.

Operation

Usage

Notes

Pick values from a list

pick(n,list)

Returns n randomly selected values from list.

Pick a random integer

randnum(low, 
high, 
increment, 
exclude)

Returns a random integer in the range from low through high in the specified increments. Optionally, specify a single value to exclude.

Deprecated Functions

The following functions have been deprecated and should no longer be used:

  • pickone()
  • picksame()