0

Is there any way to use the RandomInteger function in Mathematica such that once an integer has been drawn, it cannot be drawn again. For example, I am looking to use the RandomInteger to draw 12 integers, between 1 & 12, such that each number is only drawn once. Thanks.

SDH
  • 1

1 Answers1

0

When applied to a list, RandomSample produces a random permutation.

RandomSample@Range[12]
Alan
  • 9,410
  • 15
  • 20