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