For27. A real number X (|X| < 1) and an integer N (> 0) are given. Find the value of expression
\(X + 1 \cdot X^3/(2 \cdot 3) + 1 \cdot 3 \cdot X^5/(2 \cdot 4 \cdot 5) + ... + \\
+ 1 \cdot 3 \cdot ... \cdot (2 \cdot N - 1) \cdot X^{2 \cdot N +1}/(2 \cdot 4 \cdot ... \cdot (2 \cdot N ) \cdot (2 \cdot N +1)).\)
The number obtained is an approximate value of the function arcsin at the point X.

Solution in Python 3:

import math
X = 0.9
N = 100
print('X = ', X)
print('N = ', N)

p = X
S = X
k = 1
for i in range(1,N+1):
p *= k/((k+1)*(k+2)) * X*X
S += p
print(i," : ",k," : ",p," : ",S)
k += 2
p *= k

print("Result:")
print(S)
print("asin(x):")
print(math.asin(X))