Discussioni Q&A
What is error in it???
0 Voti
2 RisposteSwift question
0 Voti
1 RispostaNumpy
0 Voti
2 RispostePython module
0 Voti
5 RispostePRINT in PYTHON, how?
1 Voto
2 Rispostewhy is it not running?
import java.util.Scanner;
public class Myclass{
public static void main(String [] args){
Scanner in = new Scanner(System.in);
String a;
int b;
System.out.println("enter a word");
a = in.nextLine();
System.out.println("enter repetition")
b = in.nextInt();
for ( int = 0; x < b; x = x++)
System.out.println(a);
}
}
0 Voti
8 RisposteWhat is Radian?
3 Voti
4 RisposteI'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 Voti
4 RisposteHey there,
I don't know why, but when I import tkinter on IDLE like this:
from tkinter import *
And I say:
window = Tk()
Even known I use python 3.2.5, which should be able to use Tkinter, the python shell raises a ValueError that says that Tk() is not defined. I am very sure I use python 3.2.5 and tutorials from the Python Foundation say that is what I have to do. But it still doesn't work.
Does anyone have an idea of how to solve this problem? Thank you!
0 Voti
3 RisposteDjnago error
0 Voti
2 RisposteI am confused on this
0 Voti
1 RispostaWhy not working
-4 Voti
4 Rispostecompilition error
-2 Voti
2 RispostePopolare oggi
Python stressed me out
1 Votes
Course Doubt
1 Votes
Lesson Takeaways
0 Votes
Data analysis
0 Votes
Saved code
0 Votes
How do i make a lexer and parser
1 Votes