下面代码的输出结果县 x=3.1415926 print(round(x,2),round(x))

admin2019-08-30  14

问题 下面代码的输出结果县
x=3.1415926
print(round(x,2),round(x))

选项 A、3.14 3
B、3 3.14
C、2 2
D、6.28 3

答案A

解析 round(x[,ndigits])函数对x四舍五入,保留ndigits位小数。
转载请注明原文地址:https://kaotiyun.com/show/bP6p777K
0

相关试题推荐
最新回复(0)