Sesiones de PyR
String
0 Votos
2 RespuestasJavascript restart prog
6 Votos
2 RespuestasProgrammers joke !!!
6 Votos
3 Respuestaswhat does it mean?
0 Votos
2 RespuestasAre they in Python?
2 Votos
1 Respuestapython (while) cycle
0 Votos
1 RespuestaWhy
-1 Voto
2 RespuestasI'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 Votos
4 RespuestasPHP execution timed out
0 Votos
2 RespuestasSimple code issue
1 Voto
1 RespuestaHaha I'm getting better
0 Votos
2 RespuestasJava
-1 Voto
4 Respuestasvariable is ambiguous
0 Votos
2 RespuestasHow to use "WHILE"
0 Votos
1 RespuestaEn tendencia hoy
Safety Deposit Boxes
2 Votes
__str__ in Python...
0 Votes
Input sand outputs
0 Votes
Follower
1 Votes
Start
1 Votes
how to use ardino uno???
0 Votes