a=3.14
b=1.57
s=a*b
print(s) # ==>4.9298
print(round(s,0)) # ==>5.0
print(round(s,1)) # ==>4.9
print(round(s,2)) # ==>4.93
print(round(s,3)) # ==>4.93
print(round(s,4)) # ==>4.9298
print(round(s,5)) # ==>4.9298
print(round(3.2,0)) # ==>3.0
print(round(3.2,1)) # ==>3.2
因为s的计算结果是 4.9298,他只有4位小数
a=3.14
b=1.57
s=a*b
print(round(s,5)) # ==>4.9298
你是说这个? 你要求保留五位数,但结果没有保留五位数?
s的计算结果是 4.9298啊. 手动捂脸😂