收起
def func(): number = int(input("请输入学生数:")) score = {} total = {} i = 0 while i < number: no = input("请输入学号:") s = input("请输入成绩(以空格分隔):") s = [int(i) for i in s.split(' ')] score[no] = s total[no] = sum(s) i += 1 print(total) func()
报告相同问题?