Difference between revisions of "Shuffle Command"
From GeoGebra Manual
Line 8: | Line 8: | ||
;Shuffle[ <List L> ] | ;Shuffle[ <List L> ] | ||
:Returns list with same elements as ''L'', but in random order. | :Returns list with same elements as ''L'', but in random order. | ||
− | :{{ | + | :{{Examples|1=<br><code><nowiki>Shuffle[{3, 5, 1, 7, 3}]</nowiki></code> yields for example ''{5, 1, 3, 3, 7}''.<br><br><code><nowiki>Shuffle[Sequence[20]]</nowiki></code> gives the first 20 whole numbers in a random order.}} |
− |
Revision as of 00:46, 30 January 2013
- Shuffle[ <List L> ]
- Returns list with same elements as L, but in random order.
- Note: You can recompute the list via Recompute all objects in View Menu (or pressing F9).
See also RandomElement Command and RandomBetween Command.
CAS Syntax
- Shuffle[ <List L> ]
- Returns list with same elements as L, but in random order.
- Examples:
Shuffle[{3, 5, 1, 7, 3}]
yields for example {5, 1, 3, 3, 7}.Shuffle[Sequence[20]]
gives the first 20 whole numbers in a random order.