Help with randomizing- please help.
Posted: Thu Mar 03, 2005 8:27 pm
I need help with a statistics assignment.
In the program I'm making, I have 25 students.
A student is chosen randomly.
I'll call the one picked first, 1.
1 picks another random number from 1 to 25. Let's say that 1 picks 2.
Now 1 and 2 pick two more random students from the group.
1 picks 3 and 2 picks 4.
So 1, 2, 3, and 4 have been picked. Now, each of those four students gets to pick another student. (randomly from 1 to 25).
On the next round, if 1 picks 4 (a student previously picked), how do I stop 1 from picking more students? Is there a command to stop student 1 from picking more random numbers if the random number generated is equal to a random number generated previously?
Thanks, I'd really appreciate any help on generating random numbers, etc.
In the program I'm making, I have 25 students.
A student is chosen randomly.
I'll call the one picked first, 1.
1 picks another random number from 1 to 25. Let's say that 1 picks 2.
Now 1 and 2 pick two more random students from the group.
1 picks 3 and 2 picks 4.
So 1, 2, 3, and 4 have been picked. Now, each of those four students gets to pick another student. (randomly from 1 to 25).
On the next round, if 1 picks 4 (a student previously picked), how do I stop 1 from picking more students? Is there a command to stop student 1 from picking more random numbers if the random number generated is equal to a random number generated previously?
Thanks, I'd really appreciate any help on generating random numbers, etc.