题解 | #班级管理#

班级管理

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

from dataclasses import dataclass


@dataclass
class Student:
    name: str
    student_id: str
    score: int
    work_level: str

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


a = Student(input(), input(), int(input()), input())
print(a)

全部评论

相关推荐

牛客76783384...:字节:不要放箭,活捉赵子龙
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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