python阶乘求和

求表达式5✖️8!加2✖️4!的值,调用自定义函数facorial实现,程序如下
def facorial(n):
s=1
for i in range(2, ):
s=

total=
print(total)
请大家帮忙填空 共4空


def facorial(n):
    s = 1
    for i in range(2, n + 1):
        s = s * i
    return s


total = 5 * facorial(8) + 2 * facorial(4)
print(total)

示例代码如下

def facorial(n):
    s = 1
    for i in range(2, n+1):
        s = s*i
    return s

total = 5+facorial(8)+2+facorial(4)
print(total)

`有帮助望采纳~`