Difference between revisions of "RandomElement Command"
From GeoGebra Manual
m (Bot: Automated text replacement (-{{command +{{command|cas=true)) |
|||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.0}}</noinclude> | <noinclude>{{Manual Page|version=4.0}}</noinclude> | ||
− | {{command|list}} | + | {{command|cas=true|list}} |
;RandomElement[ <List> ] | ;RandomElement[ <List> ] | ||
:Returns randomly chosen element from the [[Lists|list]] (with uniform probability). All elements in the list must be of the same type. | :Returns randomly chosen element from the [[Lists|list]] (with uniform probability). All elements in the list must be of the same type. |
Revision as of 13:51, 10 September 2011
- RandomElement[ <List> ]
- Returns randomly chosen element from the list (with uniform probability). All elements in the list must be of the same type.
- Example:
RandomElement[{3, 2, -4, 7}]
yields one of {-4, 2, 3, 7}.
Note:
See also Element Command.
CAS Syntax
- RandomElement[ <List> ]
- Returns randomly chosen element from the list (with uniform probability). All elements in the list must be of the same type.
- Example:
RandomElement[{3, 2, -4, 7}]
yields one of {-4, 2, 3, 7}.
Note:
See also Element Command.