题解 | #班级管理#
班级管理
https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
class Student: def __init__(self, *args): self.name1 = args[0] self.stu_num1 = args[1] self.score1 = args[2] self.grade1 = args[3] def print(self): print( f"""{self.name1}'s student number is {self.stu_num1}, and his grade is {self.score1}. He submitted {len(self.grade1.split(' '))} assignments, each with a grade of {self.grade1} """ ) name1 = input() stu_num1 = input() score1 = input() grade1 = input() stu = Student(name1, stu_num1, score1, grade1) stu.print()