Bob103

PY_Infinity_Sum

Jul 4th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. from math import *
  2. s = 0
  3. e=float(input('e='))
  4. t = 1
  5. i=2
  6. while abs(t)>e:
  7.     t*=5/(i*i-1)
  8.     s+=t
  9.     i+=1
  10.  
  11. print(s)
Advertisement
Add Comment
Please, Sign In to add comment