>
"Hit return to load the program. Change the list ClassList to any list of people you'd like to randomly select a member of or break into groups":

ClassList:=["Lindsay Arthur"
,"John Bair"
,"Jason Bash"
,"Eduardo Bertran"
,"Margaret Cody"
,"Patrick Doherty"
,"Dennis Dwyer"
,"Shannah Feldman"
,"John Gault "
,"Lisa Glassman "
,"Heather Hanson "
,"Erin Harker"
,"Nathan Hedges"
,"Sarah Hong "
,"Dana Jupiter "
,"Ruwan Kiringoda"
,"Christopher LaForgia"
,"Caroline Levy "
,"Linda Lomelino"
,"Barbara Lum "
,"Randall Lynn " ,"Katelyn Martin"
,"Jessica Metcalfe "
,"Matthew Nielsten"
,"Jesse Nisselson"
,"Eugene Oh"
,"Alyssa Palmer "
,"Gavin Phillips"
,"Neil Putman "
,"Shawn Schmitt "
,"Katherine Schuerman"
,"Matthew Schwartz "
,"Terri-Anne Segovio"
,"James Seidman"
,"Tricia Shalka "
,"Jason Sigler"
,"Genevieve Sonsino"
,"Jeffrey Speights"
,"Sonia Tarantolo"
,"Michael Valmonte "
,"Christian Weeks"
,"Katharine Wendell "
,"Manya Whitaker "
,"Grace Yang"
,"Timothy Yang "
,"Stuart Yee"
,"Kristen Zimmer "
]:


nops(ClassList);

randomize();
R:=rand();
randomize(R);

RandomStudent:=proc(L);
L[stats[random,discreteuniform[1,nops(L)]](1)];
end:


with(combinat, randperm):
with(linalg):

Groups :=proc(L,n)
local R,i,k,k1,j,l,H,K;
R := randperm(nops(L));
k1:=nops(L)/n;
k:=floor(k1);
K:=[];
for i from 0 to k-1 do
H:=[i+1];
for j from 1 to n do
H:=[op(H),L[R[n*i+j]]];
od;
K:=[op(K),H];
od;
if nops(L)-n*k > 0
then
H:=[k+1];
for l from n*k+1 to nops(L)
do
H:=[op(H),L[R[l]]];
od;
K:=[op(K),H];
fi;
K;
matrix(K);
end:

47

1052342175

R := 203427500359

203427500359

> "Here is the program selects a random student":

RandomStudent(ClassList);

> "Here is the program that divides the class randomly into groups. The 5 below is the size of the groups, and you can change it to whatever you'd like. (If there are too few students in the final row I usually use the, to increase the size of any sparsely populated groups.":


Groups(ClassList,5);

matrix([[1,

>