Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Leibnitz Series To Estimate Pi
#Title: Leibnitz Series To Estimate Pi #Developer PANNA CHATTERJEE # Initialize denominator k = 1 # Initialize sum s = 0 for i in range(1000000): # even index elements are positive if i % 2 == 0: s += 4/k else: # odd index elements are negative s -= 4/k # denominator is odd k += 2 print(s)
run
|
edit
|
history
|
help
0
Hi
Python: Stack Simple I
Game4
Faiha - Selection Sort
Hh
PyCutRod
(P3) Fibonacci 2
Hello world
Algorytm szybkiego potęgowania
Print 5