Share your repls and programming experiences

← Back to all posts
Student Seating Charts
DevLab (1)

I created this program to create quasi-random seating charts for school classes.

This isn't really geared towards a 1-student-per-desk setup, but more for a project-based learning environment where everyone sits at work tables with groups of, say, 3 to 6 students. Although it would work for either setup.

Put student names into the "sections.txt" file, and any pairs of students that you do NOT want seated at the same table into "incompatibles.txt."

I would really appreciate any feedback on this program, as I was raised on C and Pascal, then gave up programming for years, and am pretty new to Python. In particular, anything about data types: I'm representing each table as a set(), mainly because that helps introduce some quasi-randomness to the assignments, and set operations seem pretty clear to a n00b like me.

For the record, my students were really interested in this program, we all got a big kick out of running the program at the beginning of every class. So for dramatic effect, I used termcolor and some time.sleep() function calls, but IRL I wouldn't waste the time to load those external modules.

Feel free to fork/reuse etc. Please give credit if you do so! Thanks.