The Grerory-Leibnitz series1 approximates
Write a function gregory_leibnitz
that takes an integer int
). The function must return the approximation for
>>> gregory_leibnitz(1)
4.0
>>> gregory_leibnitz(10)
3.0418396189294032
>>> gregory_leibnitz(100)
3.1315929035585537
>>> gregory_leibnitz(1000)
3.140592653839794