write a Python Program to find out below! 1 !+ 2 ! + 3 ! + 4! +...n!
Answers
Answered by
0
Answer:
fact = lambda x : 1 if x <= 1 else x * fact(x - 1)
n = int(input())
print(sum([fact(i) for i in range(1, n+1)]))
Similar questions