题解 | #求平均年龄#
求平均年龄
https://www.nowcoder.com/practice/ca319fdb02714994850cc631d76f5547
def avg(a):
print('%.2f'%(sum(a)/len(a)))
while True:
try:
age = []
n = int(input())
for i in range(n):
a = int(input())
age.append(a)
avg(age)
except:
break
查看19道真题和解析
OPPO公司福利 1059人发布