結果 : write a function to calculate factorial. in python