結果 : algorithm for pattern printing in python