计算班级平均分python

a = int(input('输入班级人数'))
i = 0
c = 0
while i < a:

    i += 1
    b = int(input(''+str(i)+'位学生成绩'))
    c += b
    d = c/a
print('你的班级平均分为%d' %d)

 

posted @ 2022-07-20 11:34  小白学程  阅读(806)  评论(0)    收藏  举报