practice coding problems in python2