题解 | 班级管理

class Student:
    def __init__(self,name,id,grade,grade_list):
            self.name = name
            self.id = id
            self.grade = grade
            self.grade_list = grade_list
name = input()
id = input()
grade = int(input())
grade_list = input().split()
stu = Student(name,id,grade,grade_list)
str = ' '.join(grade_list)
print(f'{stu.name}\'s student number is {stu.id}, and his grade is {stu.grade}. He submitted {len(stu.grade_list)} assignments, each with a grade of '+str)

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-09 12:20
点赞 评论 收藏
分享
06-07 17:17
嘉兴学院 教师
心爱的idea:你孩
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-04 15:36
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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