Implementing Algorithms using Python