• 2022-10-26
    以下哪几个是math模块中的函数?
    A: round
    B: log
    C: degrees
    D: pi
  • B,C

    内容

    • 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)