题解 | #班级管理#
班级管理
https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
class Student(object):
def __init__(self,name ,number, grade, count, level):
self.name = name
self.number = number
self.grade = grade
self.count = count
self.level = level
def p(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, self.level))
name = input()
number = input()
grade = int(input())
level = input()
count = len(level.split(" "))
s = Student(name, number, grade, count, level)
s.p()
def __init__(self,name ,number, grade, count, level):
self.name = name
self.number = number
self.grade = grade
self.count = count
self.level = level
def p(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, self.level))
name = input()
number = input()
grade = int(input())
level = input()
count = len(level.split(" "))
s = Student(name, number, grade, count, level)
s.p()