Euler project problems in python