Advertisement
darya_leushkina

Задание 10

Nov 19th, 2020
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. e = float(input())
  2. i = 1
  3. s = 0
  4. f = 1
  5. a = 1
  6. while abs(round(a / (2 * f), 33)) > e:
  7.     print(a / (2 * f))
  8.     s += a / f
  9.     a *= -1
  10.     i += 1
  11.     f *= i
  12. print(s)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement