rspls assignment from https://class.coursera.org/interactivepython-003/quiz/index