list=eval(input())
num=len(list)/3
age=0
for i in list:
if type(i)==int:
age=age+i
average_age=age/num
print('The average age of {} students is {}'.format(int(num),round(average_age,1)))
Python计算平均年龄
于 2022-04-22 00:06:20 首次发布