New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
List index return not valid
7 Votes
6 AnswersWhich is best
13 Votes
12 Answers"For" doubt in python
0 Votes
4 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 AnswersHelp with code (array)
3 Votes
4 AnswersGO PROGRAMMING LANGUAGE
1 Vote
4 AnswersUnderstanding Boolean logic
0 Votes
4 AnswersHot today
Why didn't I get it?
1 Votes
Access deny problem
2 Votes
BOTSS
0 Votes
Help
0 Votes
A small question
0 Votes
How to use ai ?
0 Votes
C++20 module Cmake Source Code
1 Votes