Обсуждения
My first Python code
3 голосов
1 ответ[Raspberry Pi] Remote access doubts
35 голосов
20 ответовПлощадь и периметр круга
0 голосов
3 ответовWho codes on raspberry pi?
1 голос
2 ответовRaspberryPi
3 голосов
6 ответовhow do we input fraction in python?
0 голосов
4 ответовPlatinum on the π day!
26 голосов
12 ответовWhat are your suggestions about this
-2 голосов
5 ответовPython in electronics
0 голосов
2 ответовHow Do I do this
0 голосов
1 ответI'm trying to calculate the decimal places of pi with Ramanujan's formula. but with this code I'm getting the same output for all values of n, which it shouldn't.
from math import sqrt, factorial as f
sum=0
n=0
k=(2*sqrt(2)/9801)
while n<=100000:
sum=sum+((f(4*n))*(1103+(26390*n)))/(((f(n))**4)*(396**(4*n)))
y=1/(k*sum)
print('%.60f' % y)
n=n+1
where am I doing wrong?
2 голосов
4 ответовHelp me with my code!
2 голосов
5 ответовАктуальное сегодня
C pointers
1 Votes
Python
0 Votes
Guys help please
0 Votes
Slicing in python
1 Votes
Python question
1 Votes
Control flow
0 Votes
HTML
0 Votes
Front-end vs Full-stack
1 Votes