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