List permutation at Random

jean-pierre Ortolland shared this question 5 years ago
Needs Answer

Hi

How to permute at random the list Couples_{name} , when clicking on an Ok button ?


n=Slider(2,20, 2 )
C: Circle((0, 0), 1)
Lp = Sequence(e^(ί 2 π k / n), k, 0, n-1)
Couples_{name}={"A", "A", "B", "B", "C", "C", "D", "D", "E", "E", "F", "F", "G", "G", "H", "H", "I", "I", "J", "J"}


Best Answer
photo

hi

I usually define a list as a shuffled list from the start. list=Shuffle(<definition list>), because now you can easily permutate the list on a button with just the command UpdateConstruction().

chris

Comments (2)

photo
2

hi

I usually define a list as a shuffled list from the start. list=Shuffle(<definition list>), because now you can easily permutate the list on a button with just the command UpdateConstruction().

chris

photo
1

exactly what I would like !

thousands of Thanks ccambre

© 2023 International GeoGebra Institute