题解 | #班级管理#
班级管理
https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
class Student: def __init__(self, name, num, grade, level): self.name = name self.num = num self.grade = grade self.level = level def stu_print(self): print(f"{self.name}'s student number is {self.num}, and his grade is {self.grade}. He submitted {len(self.level)//2 +1} assignments, each with a grade of {self.level}") s = Student(input(), input(), input(), input()) s.stu_print()