A: round
B: log
C: degrees
D: pi
举一反三
- 以下哪几个是math模块中的函数? A: round B: log C: degrees D: pi
- 以下哪几个是math模块中的函数? A: round B: log C: degrees D: pi
- 如果我们需要从math模块中输出pi常量,以下代码正确的是? A: print(math.pi) B: print(pi) C: from math import pi print(pi) D: import math print(math.pi)
- Python中调用_________来计算数的绝对值 A: math模块中的gcd函数 B: math模块中的sqrt函数 C: math模块中的abs函数 D: uiltins模块(即内置模块)中的abs函数
- 如果我们需要从 math 模块中输出 pi 常量,以下代码正确的是?
内容
- 0
输入一个表示半径的浮点数,计算圆的面积的程序正确的有:[br][/br] (圆周率取使用math库中的pi值,结果保留2位小数) A: import math <br> radius = float(input()) area = math.pi * radius ** 2 print(round(area, 2)) B: import math <br> radius = float(input()) area = pi * radius ** 2 print(round(area, 2)) C: from math import pi <br> radius = float(input()) area = math.pi * radius ** 2 print(round(area, 2)) D: from math import pi <br> radius = float(input()) area = pi * radius ** 2 print(round(area, 2))
- 1
以下哪些函数是Math对象的?( ) A: random() B: max(3,10) C: round(1.5) D: rnd(7.25)
- 2
以下导入语句中哪个是错误的: A: import math B: import math as m C: from math import pi D: import pi from math
- 3
下列属于math中的数学函数的是( )。 A: time( ) B: round( ) C: sqrt( ) D: random( )
- 4
要显示模块math中的所有函数,使用的命令是: A: importmath B: dir(math) C: help(math) D: list(math)