题解 | #累加数与平均值#
累加数与平均值
https://www.nowcoder.com/practice/ed009465ad6940609542ef5879a0d697
#此代码好处在于能够输入很多数字用于计算 a = [] for i in input().split(): a.append(int(i)) avg = sum(a)/len(a) print(sum(a),round(avg,1))#保留一位小数
累加数与平均值
https://www.nowcoder.com/practice/ed009465ad6940609542ef5879a0d697
#此代码好处在于能够输入很多数字用于计算 a = [] for i in input().split(): a.append(int(i)) avg = sum(a)/len(a) print(sum(a),round(avg,1))#保留一位小数
相关推荐