python 实现浮点数按照四舍五入进行取整 # 输入一个数按照四舍五入取整 num = float(input('请输入一个浮点数:')) num1, num2 = str(num).split('.') if float(