Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 645583900b
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (37 sloc) 0.988 kb
#Tiffany Phan Pd. 7
import random
list = open('ml7-student-names')
names = list.readlines()
pd6 = []
pd7 = []
#Method to organize period 6 and 7 students into their respective lists
def organize():
numOfStudents = len(names)
counter = 0
while counter < numOfStudents:
if(names[counter].find("6") != 0):
pd6.append(names[counter].rstrip('6'))
else:
pd7.append(names[counter].rstrip('7'))
#Method to make the groups of 4 within each period
def makeGroups(period):
a = 0
s = "Group "
n = 1
s2 = "%s%d"%(s,n)
print s2 "\n"
while len(period) > a
print period[a] "\n"
if a % 4 == 0
s2++
print "\n" s2 "\n"
#Run organize to put students into respective periods
organize()
#Shuffle students within each period
shuffle(pd6)
shuffle(pd7)
#Make and print out groups
print "GROUPS FOR PERIOD 6\n"
makeGroups(pd6)
print "GROUPS FOR PERIOD 7\n"
makeGroups(pd7)
Jump to Line
Something went wrong with that request. Please try again.