@emwdx/GroupGenerator
Python3

No description

repl talk
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import random

#These are the lists of my students' names for each class.
robotics_students = ['thomas','cherry','junbo','daphine','min-xiu','kevin','elena']
math9 = ['benny','min','jack','sophia','diya','candice','manar','jenifer','yu-kyung','christian','pietro','andrew','jun-yu']
aa_students = ['yu-chung','max','kevin','karen','lucinda','xenia','apolline','jesse']
#advisory = ['flo', 'sam', 'jessie', 'maiti',  'min-xiu', 'paul', 'thomas','noah','yun-zhi']
ibmath2= ['vanessa','alex','shane','jun-hao','rodick','elena','suki','daphine']
physics = ['min-xiu','jessie','thomas','yun-zhi']
ibmath1 = ['emma','karen','xenia','kevin','lucinda','carmen','nirvaan','saarthak']
geo2 = ['steve','carmen','lianne','jason','yu-chung','kim','robin','apolline','kevinkang','kevinpark','sam','julius','nirvaan','junbo','chris','caroline']
web = ['andrea','jenifer','sahil','vadim','simon','jia-hui','prachi','william']
guys = ['paul','minxiu','noah','thomasW','rahul','isaac','thomasL','jakob','ian']
girls = ['emilly','jane','sam','jessie','maiti','flo','maddie','cherry','christine','jenny','amy','celine']
robotics=['daniel','luke','prachi','taeuk','kale','jung-woo','jake','choon-wun','dominick','alex']
sixthboys = ['kevin','charlie','jerry','mathias','lucas','veikka','jacky','james','jack','min-sang','ray']
sixthgirls = ['nillkie','manon','jarul','ho-jeong','rachel L','khushi','elena','angela','amy','anaelle','aanchal','rachel S','suhani','sunny']
msrobots=['alan','lucas','ha-vi','jennie','james','charlie','jarul','benjamin','jae-woo','kevin','jack','madhu','jeffrey','alex']
la = ['jemmy','ho-jeong','jae-woo','rachel','elena','amy','anaelle','yeon-woo','suhani','grace','jack','min-sang']
ibmathB = ['kim','jenny','kenna','jerry','judy','uijin','ying ying','simon','linh','kaithe','soohyeon','dao','doanh','thy','stella','kevin','nhu','nirat','hanna','b.y.']
precalcC = ['tran','jen','melissa','ka roi','may','anne','dan dan','kun','minseok','jacob','alex','lucia','sungjin','junhyung']
ibmathF =['sierra','vona','natalie','lea','steffi','j.s.','josh','sean','hang','david b','david v','peter','erina','john']
alg2=["kristy","kaitlan","tina","bunny","haryoung","jiyoon","gia-bao","andy","ben","zach","nantha","uyen"]
precalcE = ['minju','jaewon','san-san','sumin','emily','jae-young','thao-my','don','chia yo','nhu','eun-sol','ye bin','chan','angeline','keiji','celine','ellen','lauren','carrie','caden','an thi','jiyoun']
advisory = ['angel','tommy','mai','jiyoon','alina','ruby','marielle','jeongwoo','jihwan','frannie','angie']

#Scroll down to the line marked ENTER INFORMATION HERE - this is all the formulation of my grouping algorithm.

def get_groups(names,parameters):
        total = 0
        i = 0
        output = []
        for item in parameters:
                i = i + 1
                total = total + i*parameters[i-1]
        if (total!=len(names)):
                print ('Parameters not set correctly')
        else:
                random.shuffle(names)
                random.shuffle(names)
                random.shuffle(names)
                random.shuffle(names)
                random.shuffle(names)
                                                                            
                i = 0
                curr_index = 0
                num = 1
                for item in parameters:


                        if (item!=0):
                                
                                for i in range(0,item):
                                        temp_group = names[0:num]
                                        output.append(temp_group)
                                        del names[0:num]
                        num +=1
        groupIndex = 1                        
        for group in output:
                print("Group "+str(groupIndex)+":")
                groupString=""
                for name in group:
                        groupString+=(name+",")
                print (groupString)
                groupIndex+=1
                        
#ENTER INFORMATION HERE
get_groups(precalcE,[0,0,2,4])
#get_groups(alg2,[0,0,4])
#get_groups(ibmathF,[0,0,2,2])
#get_groups(ibmathB,[0,0,4,2])
#get_groups(precalcC,[0,0,3,1]) 
#get_groups(math9,[0,0,2,2])
#get_groups(math9,[0,0,3,1]) 
#get_groups(sixthboys,[0,1,3])
#get_groups(sixthgirls,[0,1,4])
#get_groups(ibmath1,[0,0,0,2])
#get_groups(aa_students,[8])
#get_groups(physics,[4])
#get_groups(advisory,[0,1,3])
#get_groups(calculus,[11,0,0])
#get_groups(msrobots,[0,0,2,2])                
#get_groups(robotics_students,[0,2,1])
#get_groups(robotics,[10])
#get_groups(web,[0,0,0,2])
#get_groups(ibmath2,[0,1,2])
#get_groups(sixthgirls,[0,1,4])
#for students in class_name:
#	print students
#get_groups(geo2,[0,0,0,4])



Python 3.6.1 (default, Dec 2015, 13:05:11) [GCC 4.8.2] on linux