"""Бодлого 11."""
num = 21
sum = 0
n = 0
while n <= num:
sum += 1/(2*n+1)*(-1)**n
print(sum)
n += 1
print('\n')
"""Бодлого 12."""
num = 10
multiple = 1
n = 1
while n <= num:
multiple *= (2*n)/(2*n-1) * (2*n)/(2*n+1)
print(multiple)
n += 1
print('\n')
"""Бодлого 13."""
num = 10
a = 5
n = 1
multiple = a
diff = 1 / multiple
while n <= num:
multiple *= (a + n)
diff -= 1 / multiple
print(diff)
n += 1
print('\n')
"""Бодлого 14."""
num = 10
n = 1
sum = 1 / (1 * (3)**(1/2))
while n <= num:
sum += 1 / ((2*n + 1) * 3**n) * (-1)**n
print(sum)
n += 1
No comments:
Post a Comment