Euler Project problems in IPython Notebook