A.Compilationfails.
B.Piisapproximately3.
C.Piisapproximately3.141593.
D.Anexceptionisthrownatruntime.
第1题:
在JavaScript中,下面哪一条语句在页面上显示圆周率π。()
A.document.write(Math.Pi)
B.document.write(Math.pi)
C.document.write(Math.PI)x
第2题:
如果我们需要从 math 模块中输出 pi 常量,以下代码正确的是?
A.print(math.pi)
B.print(pi)
C.from math import pi print(pi)
D.from math import pi print(math.pi)
第3题:
math库包含4个数学常数,math.pi表示自然对数,math.e表示圆周率
第4题:
5、以下哪个语句组可以用来进行自定义对象的实例化?
A.function a(x) { var y=Math.PI*x; } var ao=new a(2);
B.function a(x) { this.X=x*x; } var ao=new a(2);
C.function a(x) { this.X=x*x; } var ao=a(2);
D.function a(x) { var y=Math.PI*x; } var ao=a(2);
第5题:
以下哪个语句组可以用来进行自定义对象的实例化?
A.function a(x) { var y=Math.PI*x; } var ao=new a(2);
B.function a(x) { this.X=x*x; } var ao=new a(2);
C.function a(x) { this.X=x*x; } var ao=a(2);
D.function a(x) { var y=Math.PI*x; } var ao=a(2);