题解 | #班级管理#
班级管理
https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
class Student(object):
def __init__(self,name,id,score,grade):
self.name = name
self.id = id
self.score = score
self.grade = grade
self.times = len(grade.split(' '))
def printd(self):
print("{}'s student number is {}, and his grade is {}. He submitted {} assignments, each with a grade of {}".format(self.name,self.id,self.score,self.times,self.grade))
a = input()
b = input()
c = input()
d = input()
student1 = Student(a,b,c,d)
student1.printd()
查看7道真题和解析
快手公司福利 1244人发布