如果只需要math模块中的sin()函数,建议使用frommathimportsin来导入,而不要使用importmath导入整个模块。
此题为判断题(对,错)。
第1题:
使用math模块前,需要使用【 】语句导入该模块。
第2题:
如果需要使用scala库中的sqrt函数,如sqrt(2),下列引用包的方式错误的是?
A.import scala.math._
B.import sqrt
C.import math._
D.import math.sqrt
第3题:
10、判断如下陈述是否正确? 如果要从math模块导入sqrt函数,可以使用语句“from sqrt import math”。
第4题:
判断如下陈述是否正确? 如果要从math模块导入sqrt函数,可以使用语句“from sqrt import math”。
第5题:
如果需要使用Scala库中的sqrt函数,如sqrt(2),下列引用包的方式错误的是
A.import scala.math._
B.import sqrt
C.import math._
D.import math.sqrt