0
votes

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.

1
@HighPerformanceMark Sweet, I think that will be perfect. Thank you sir. - SDH
“RandomSample[12]” is what ended up doing the trick. - SDH - SDH
@HighPerformanceMark haha. none the less, appreciate the help Mr Mark - SDH

1 Answers

0
votes

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

RandomSample@Range[12]