python經典程序練習題4:計算1+2!+3!+4!+……+10!

sum = 0 for i in range(1, 11): sum1 = 1 for n in range(1, i + 1): sum1 = sum1 * n sum = sum + sum1 print(sum)
相關文章
相關標籤/搜索