Fixing Student Allocation I am attempting to group students by their personality
ID: 3709233 • Letter: F
Question
Fixing Student Allocation
I am attempting to group students by their personality.
The ideal group composition would be 2 leaders, 2 researchers, 2 planners and 4 workers.
I would like for data to be read in from a csv with the format displayed below (assume there are over a hundred students):
This is what I have so far:
It almost works, however it produces this csv:
It creates group 0 fine, however, after it just adds everyone else to group 1.
Ideally, it would add students to group 2 after ten students have been added to group 1 and so forth.
How can I rectify this problem?
Thanks
id first name 1 Brinn 2 Querida 3 Charlene 4 Kamillah 5 Neel 6 Jourdan 7 Kevina last_namee Scherme Kuzemka Bamlett Banker Colleer Dunham Kaygill email bscherme0@umich.edu qkuzemka1@yellowbook.com cbamlett2@ibm.com kbanker3@weibo.com ncolleer4@gnu.org jdunham5@webnode.com kkaygill6@latimes.com personality researcher/planner leader/researcher/planner leader/worker/researcher/planner researcher leader/researcher/planner leader worker/researcher/plannerExplanation / Answer
I can not copy paste for the image. Still I think I have got the problem. You are not iterating over all groups.
You are on index 0 .
you create new group (index 1) and break. Whe you break it goes to next line instead of next group.
Cound you replace code from line 37 to 48 by this and try
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.