Random Permutation Generator
-- used to generate a random permutation of the first N non-negative integers.
PRE CONDITIONS
- The .py file is available in the src directory.
STEPS TO FOLLOW
-
Locate the .py file.
-
Search for 50 and replace it with the number N of your choice.
POST CONDITIONS
- A random permutation of the first N non-negative integers is generated.
EXAMPLE
M$ python tryThis.py
[4, 0, 5, 8, 14, 6, 1, 3, 7, 12, 9, 13, 10, 11, 2]
M$ python tryThis.py
[6, 14, 12, 8, 1, 0, 9, 5, 13, 10, 2, 11, 7, 3, 4]
M$ python tryThis.py
[13, 5, 8, 7, 2, 10, 1, 0, 3, 11, 12, 4, 9, 14, 6]
M$ python tryThis.py
[10, 12, 14, 2, 11, 9, 5, 4, 13, 6, 8, 1, 0, 7, 3]