very challenging part of the python tutorial on code academy