题解 | #累加数与平均值#
累加数与平均值
https://www.nowcoder.com/practice/ed009465ad6940609542ef5879a0d697
list = input().split( )
total = 0
for i in list:
total += int(i)
print(total,f'{total/len(list):.1f}')#不加{}输出的直接是字符串
注意:输出小数有以下几种方法
1.print(f"{sum/len(a):.1f}")
2.print(round(sum/len(a),1)
3.print('{:.1f}'.format(sum/len(a))

