結果 : algorithm for if else statement in python