Writing sum over loop using math.factorial within

后端 未结 0 448
攒了一身酷
攒了一身酷 2020-12-24 07:13

I\'m trying to write a function to calculate such a sum:

∑_(k=0)^n 1/k!

So expected result with n = 2: 1/factorial(0) + 1/factorial(1) + 1/fa

相关标签:
回答
  • 消灭零回复
提交回复
热议问题