题解 | #班级管理#
班级管理
https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
from dataclasses import dataclass
@dataclass
class Student:
name: str
student_id: str
score: int
work_level: str
def __str__(self):
return f"{self.name}'s student number is {self.student_id}, and his grade is {self.score}. He submitted {len(self.work_level.split())} assignments, each with a grade of {self.work_level}"
a = Student(input(), input(), int(input()), input())
print(a)

