题解 | #班级管理#

班级管理

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

相关推荐

喜欢吃蛋糕仰泳鲈鱼是我的神:字节可以找个hr 给你挂了,再放池子捞
点赞 评论 收藏
分享
10-28 14:42
门头沟学院 Java
watermelon1124:因为嵌入式炸了
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务