题解 | 班级管理
class Student:
def __init__(self,name,id,grade,grade_list):
self.name = name
self.id = id
self.grade = grade
self.grade_list = grade_list
name = input()
id = input()
grade = int(input())
grade_list = input().split()
stu = Student(name,id,grade,grade_list)
str = ' '.join(grade_list)
print(f'{stu.name}\'s student number is {stu.id}, and his grade is {stu.grade}. He submitted {len(stu.grade_list)} assignments, each with a grade of '+str)
查看14道真题和解析