17-输入题:读取浮点数并四舍五入到 1 位
语法讲解
今天学: round 的 ndigits 参数
x = float(input())
print(round(x, 1))
小练习
输入为:3.14159。运行下面代码后输出是什么?
x = float(input())
print(round(x, 1))
提交要求: 只提交最终输出结果,不要添加多余的说明或引号。
今天学: round 的 ndigits 参数
x = float(input())
print(round(x, 1))
输入为:3.14159。运行下面代码后输出是什么?
x = float(input())
print(round(x, 1))
提交要求: 只提交最终输出结果,不要添加多余的说明或引号。
全部评论