Q&A Discussions
index out of bounds
1 Vote
1 AnswerWho's can help me ?!
2 Votes
1 AnswerCoding goals/challenges?
0 Votes
4 AnswersProjects for a beginner?
2 Votes
3 AnswersImage doesn't appear in js
0 Votes
2 AnswersBest Buy(Laptop)
0 Votes
5 AnswersI'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 Votes
4 AnswersContest by sololearner peers
0 Votes
1 AnswerRandom number
0 Votes
3 AnswersWhy does this not work?
0 Votes
3 AnswersHot today
What's wrong in my code?
4 Votes
App Development
1 Votes
GUI-Based Python code in Webpage
2 Votes
HTML
1 Votes
Introduction of html
0 Votes
Web Developer Job?
1 Votes