I'm trying to generate a random distribution of 0's and 1's to a 2x10 array with the condition that a number of 1's must be a set number, let's say 15.
Here is an exact example of what I'm trying to accomplish:
- Student will be attending RANDOM 15 classes (or any number between 1 and 20)
- There are two classes per day, one in the morning, the second in the evening
- Classes will be held in 10 consecutive days
- Since student will be attending only 15 out of total 20 classes, 5 classes need to be randomly skipped
- Generate 2x10 array with the conditions above
Here is an exact example of what I'm trying to accomplish:
- Student will be attending RANDOM 15 classes (or any number between 1 and 20)
- There are two classes per day, one in the morning, the second in the evening
- Classes will be held in 10 consecutive days
- Since student will be attending only 15 out of total 20 classes, 5 classes need to be randomly skipped
- Generate 2x10 array with the conditions above