Difference between revisions of "Shuffle 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 )
(command syntax: changed [ ] into ( ))
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|statistics}}
{{command|cas=true|statistics}}
+
;Shuffle( &lt;List> )
;Shuffle[ <List L> ]
+
:Returns list with same elements, but in random order.
:Returns list with same elements as ''L'', but in random order.
+
:{{note|You can recompute the list via ''Recompute all objects'' in [[File:Menu-view.svg|link=|16px]] [[View Menu]] (or pressing {{KeyCode|F9}}).}}
:{{note|You can recompute the list via ''Recompute all objects'' in [[View Menu]] (or pressing {{KeyCode|F9}}).}}
 
 
See also [[RandomElement Command]] and [[RandomBetween Command]].
 
See also [[RandomElement Command]] and [[RandomBetween Command]].
 
==CAS Syntax==
 
==CAS Syntax==
;Shuffle[ <List L> ]
+
;Shuffle( &lt;List> )
:Returns list with same elements as ''L'', but in random order.
+
:Returns list with same elements, 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.}}
+
:{{Examples|1=<br>
 +
:*<code><nowiki>Shuffle({3, 5, 1, 7, 3})</nowiki></code> yields for example ''{5, 1, 3, 3, 7}''.
 +
:*<code><nowiki>Shuffle(Sequence(20))</nowiki></code> gives the first 20 whole numbers in a random order.}}

Latest revision as of 11:33, 6 October 2017


Shuffle( <List> )
Returns list with same elements, but in random order.
Note: You can recompute the list via Recompute all objects in Menu-view.svg View Menu (or pressing F9).

See also RandomElement Command and RandomBetween Command.

CAS Syntax

Shuffle( <List> )
Returns list with same elements, 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.
© 2024 International GeoGebra Institute