• Cours
  • Compilateur de code
  • Discuter
  • Tarification
  • Équipes
Menu

Discussions Q&R

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?
iterationmathpipythonseries
2 Votes
4 Réponses
17th Sep 2016, 4:33 AM
Abhishek Chauhan
Abhishek Chauhan - avatar
Module
%examshelpmejavamodulequestionstudentuniversityuob
0 Vote
2 Réponses
16th Oct 2018, 9:37 AM
Shooq Janahi
< Précédent1...89Suivant >
Aujourd'hui en vedette
Hofstadter a sequence code coach is not running
0 Votes
the code for bigneer is not really what to do after coding begeneer in sololearn
0 Votes
Input errors (python)
1 Votes
Vote Code
1 Votes
What’s the actual difference between MB and GB in real-world usage?
1 Votes
Without degree job
0 Votes
Script file names
0 Votes
I wanna know is that what about dot net developers in future there is possible they gonna downfall in industry
0 Votes
Je cherche des gens qui parle français pour apprendre le langage c
0 Votes
How can I add gradient to the background
1 Votes