题解 | #班级管理#

班级管理

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)
全部评论

相关推荐

蚂蚁 基架java (n+6)*16 签字费若干
点赞 评论 收藏
分享
有趣的牛油果开挂了:最近这个阶段收到些杂七杂八的短信是真的烦
点赞 评论 收藏
分享
1 收藏 评论
分享
牛客网
牛客企业服务