結果 : how to code a piecewise function in python