Программа:
Python:
from math import factorial
N = int(input('N = '))
X = float(input('X = '))
summ = 1 + X
for i in range(2, N + 1):
summ += X**N / factorial(N)
print(summ)
Программа:
Python:
from math import factorial
N = int(input('N = '))
X = float(input('X = '))
summ = 1 + X
for i in range(2, N + 1):
summ += X**N / factorial(N)
print(summ)