题解 | #班级管理#

班级管理

https://www.nowcoder.com/practice/e5539db11767449ab2fb68ed3c2446d0

class Student:
    def __init__(self,name,number,grade,level):
        self.name = name
        self.number = number
        self.grade = grade
        self.level = level
        self.count = len(level)
    def show(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," ".join(self.level)))
name = input()
number = input()
grade = int(input())
level = input().split()

stu = Student(name,number,grade,level)
stu.show()
全部评论

相关推荐

出自剑来:找工作就是运气大于实力的事 我们组的应届生也是上周在牛客招聘被百度的捞了,一周速通下of
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务