Difference between revisions of "RandomElement Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}</noinclude>
+
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
{{command|cas=true|list}}
 
{{command|cas=true|list}}
 
;RandomElement[ <List> ]
 
;RandomElement[ <List> ]

Revision as of 21:21, 9 March 2013



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.
© 2024 International GeoGebra Institute