Properties
Similar Topics
Statistics
Comments
5
Participants
3
Subscribers
3
Votes
1
Views
256
Share
How to generate two lists with random elements without repeating the values of elements in the same
Answered
l1={1,7,3,8,2,6}
l2={3,8,4,6,3,4}
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2021 International GeoGebra Institute
now I understand
l1 = Sequence(13)  6 \ {0} for numbers 5..7 but zero
l2 = Sequence(RandomElement(l1), k, 1, 20)
l3 = Sequence(RandomElement(l1 \ {l2(k)}), k, 1, 20)
l4 = Sequence(RandomElement(l1 \ {l2(k), l3(k)}), k, 1, 20) etc
shuffle(sequence(n))
or
shuffle(list)
now I understand
l1 = Sequence(13)  6 \ {0} for numbers 5..7 but zero
l2 = Sequence(RandomElement(l1), k, 1, 20)
l3 = Sequence(RandomElement(l1 \ {l2(k)}), k, 1, 20)
l4 = Sequence(RandomElement(l1 \ {l2(k), l3(k)}), k, 1, 20) etc
Comments have been locked on this page!