题解 | #班级管理#

班级管理

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

class Student:
    
    def __init__(self,name,student_id,score,grade):
        self.name = name
        self.student_id = student_id
        self.score = score
        self.grade = grade
        self.len = len(self.grade.split())

    def __str__(self):
        return f"{self.name}'s student number is {self.student_id}, and his grade is {self.score}. He submitted {(self.len)} assignments, each with a grade of {self.grade}"


a = input()
b = input()
c = int(input())
d = input()

shit = Student(a,b,c,d)
print(shit)

#pyhton#
全部评论

相关推荐

11-01 08:48
门头沟学院 C++
伤心的候选人在吵架:佬你不要的,能不能拿户口本证明过户给我。。球球了
点赞 评论 收藏
分享
10-09 09:39
门头沟学院 C++
HHHHaos:这也太虚了,工资就一半是真的
点赞 评论 收藏
分享
3 收藏 评论
分享
牛客网
牛客企业服务