exercise of core python 2