結果 : write a python script using function to calculate xy