Обсуждения
Как сделать проверку условия?
0 голосов
1 ответЦикл while, с вводом и двумя if
0 голосов
1 ответWhat's wrong in this code?
1 голос
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 ответовPHP execution timed out
0 голосов
2 ответовWhat's Wrong With My Code??
0 голосов
2 ответовSimple code issue
1 голос
1 ответHaha I'm getting better
0 голосов
2 ответовHow do you use canvas with Brython?
0 голосов
3 ответовPress 2 to contact customer support
0 голосов
2 ответовvariable is ambiguous
0 голосов
2 ответовHow to use "WHILE"
0 голосов
1 ответHow to loop input using exceptions
0 голосов
1 ответA doubt with repeated numbers 😃
0 голосов
1 ответpyton array Q!
0 голосов
1 ответSubtraction problem
0 голосов
3 ответовSololearn 🏤Is it helpfull to learn?😊
2 голосов
1 ответMoney Rate Income
1 голос
1 ответIn the continue Loop -
i = 0
while True:
i = i +1
if i == 2:
print("Skipping 2")
continue
if i == 5:
print("Breaking")
break
print(i)
print("Finished")
It shows the output being
"1
Skipping 2
3
4
Breaking
Finished"
Why are the last three lines not
"Breaking
5
Finished"
Where it shows print(i) after break?
1 голос
3 ответовАктуальное сегодня
Pig Latin
0 Votes
Please rate my code from 1 to 10
2 Votes
Square Roots
0 Votes
What's wrong with this?
1 Votes
Uuu
2 Votes
How to start
0 Votes
Recursion doubt
2 Votes