"""Бодлого 7."""
num = 26
sqrt = 2**(1/2)
n = 0
while n <= num:
sqrt = (2 + sqrt)**(1/2)
print(sqrt)
n += 1
print('\n')
"""Бодлого 8."""
num = 40
sqrt = 2**(1/2)
n = 2
while n <= num:
sqrt = (n * sqrt)**(1/2)
print(n, sqrt)
n += 2
print('\n')
"""Бодлого 9."""
num = 10
sqrt = 2**(1/2)
n = 0
multip = sqrt / 2
while n <= num:
sqrt = (2 - sqrt)**(1/2)
multip *= sqrt / 2
print(multip)
n += 1
"""Бодлого 10."""
num = 10
sum = 0
n = 1
while n <= num:
sum += ((n + 1)/n)**(1/(n + 1))
print(sum)
n += 1
No comments:
Post a Comment