题解 | #平均身高#
平均身高
http://www.nowcoder.com/practice/b0e489a749f448e2b37f26ef56a76e58
a,b,c,d,e=map(float,input().split())
print("{:0.2f}".format((a+b+c+d+e)/5))
- 因为要求保留两位小数,所以我用了round(,2)
- 但结果不对,不知道为什么,好像做了四舍五入。??
平均身高
http://www.nowcoder.com/practice/b0e489a749f448e2b37f26ef56a76e58
a,b,c,d,e=map(float,input().split())
print("{:0.2f}".format((a+b+c+d+e)/5))
相关推荐