Solving codeamy problems using python