Udacity Alorithm class Quiz using python