print("{:.2f}".format(float(input()))) 解析如下: str.format() 格式化数字方法: 例如: >>> print("{:.2f}".format(3.1415926)) 3.14 数字 格式 输出 描述 3.1415926 {:.2f} 3.14 保留小数点后两位 float() 强制转换为浮点型: 例如: x = float(8) # x 输出结果为 8.0 y = float...