题解 | #班级管理#

班级管理

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

相关推荐

05-29 09:02
门头沟学院 Java
点赞 评论 收藏
分享
05-26 22:25
门头沟学院 Java
Java小肖:不会是想叫你过去把你打一顿吧,哈哈哈
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务