Creating Algorithms In Python