Some practice implementing various algorithms in python