题解 | #班级管理#

班级管理

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

class Student:
    def __init__(self, name, num, grade, level):
        self.name = name
        self.num = num
        self.grade = grade
        self.level = level

    def stu_print(self):
        print(f"{self.name}'s student number is {self.num}, and his grade is {self.grade}. He submitted {len(self.level)//2 +1} assignments, each with a grade of {self.level}")


s = Student(input(), input(), input(), input())
s.stu_print()

全部评论

相关推荐

点赞 评论 收藏
分享
11-05 07:29
贵州大学 Java
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务