結果 : define algorithm in python with example