generated from mwc/project_banjo_app
20 lines
403 B
Python
20 lines
403 B
Python
|
|
|
|
import random
|
|
|
|
class Roster:
|
|
"""Needs a roster, place to load it from, a file locater for the
|
|
list, and ability to adjust roster"""
|
|
|
|
def __init__(self):
|
|
self.students = []
|
|
|
|
def load_from_list(self, names):
|
|
self.students = names
|
|
|
|
def get_random_student(self):
|
|
if not self.students:
|
|
return None
|
|
return random.choice(self.students)
|
|
|