= 60): count+=1 sum += int(nums[i]) if(numb_7-2 统计一批学生的平均">
赞
踩
[题解]浙大Python PTA课后习题博客记录(Python)
numbers = int(input());sum = count = 0
if(numbers == 0): print("average = 0.0\ncount = 0" )
else:
nums = list(input().split())
for i in range(numbers):
if(int(nums[i]) >= 60): count+=1
sum += int(nums[i])
if(numbers != 0):
print("average = %.1f" %(sum/numbers))
print("count = %d" %(count))
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。