题解 | #班级管理#
班级管理
http://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0
class Student(object):
def __init__(self, name, sid, score, homework):
self.name = name
self.id = sid
self.score = score
self.hw = homework
self.hwlen = len(homework.split(" "))
name = input()
sid = int(input())
score = int(input())
hw = input()
d = Student(name, sid, score, hw)
print(d.name+"'s student number is "+str(d.id)+", and his grade is "+str(d.score)+". He submitted "+str(d.hwlen)+" assignments, each with a grade of "+d.hw)