以下Math的方法运用中,哪个方法返回的值是9.0。( )
A: Math.floor(9.6);
B: Math.sqrt(100);
C: Math.max(9.0 , 10.0);
D: Math.round(9.6);
A: Math.floor(9.6);
B: Math.sqrt(100);
C: Math.max(9.0 , 10.0);
D: Math.round(9.6);
A
举一反三
- 引用math模块中sqrt函数的导入语句,下列错误的语句是:( ) A: import math B: from math import sqrt C: from sqrt import math D: from math import *
- 下列语句错误的是_____。? import math|from math import sqrt|import sqrt|from math import *
- 下列语句错误的是_____。 A: from math import sqrt B: import math C: from math import * D: import sqrt
- Math对象的哪个方法可以返回小于等于参数的整数?() A: round() B: pow() C: floor() D: ceil()
- 以下哪个不是正确的引入math库或其函数的语句() A: import math B: from math import * C: from math import math D: import math as ma
内容
- 0
调用Math类的静态方法max()时,用法正确的是 A: Math.max B: Math.max() C: max D: max()
- 1
Math对象的( )方法是返回 0 ~ 1 之间的随机数? A: random() B: round() C: sin() D: sqrt()
- 2
from math import sqrt 表示从sqrt库导入math函数
- 3
以下导入模块的语句正确的是 A: import math B: from math import * C: from math import sqrt D: 以上都正确
- 4
计算数学公式如a的平方根,应该使用( )类中的方法。 A: Math.sqrt(a) B: Math=sqrt(a) C: Math->;sqrt(a) D: sqrt(a)