题解 | #班级管理#

班级管理

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

class Student():
    def __init__(self,name,code,score,times,grade):  # 初始化
        self.name = name
        self.code = code
        self.score = score
        self.times = times
        self.grade = grade
    def shuchu(self):
        print(f"{self.name}'s student number is {self.code}, and his grade is {self.score}. He submitted {self.times} assignments, each with a grade of {' '.join(self.grade)}")

n = input()
c = input()
s = int(input())
gr = input().split()
t = len(gr)

a = Student(n,c,s,t,gr)
a.shuchu()

全部评论

相关推荐

下个早班:秒挂就是不缺人
点赞 评论 收藏
分享
05-29 20:34
门头沟学院 C++
KarlAllen:得做好直接春招的准备。学历差的话,一是面试要求会比学历好的严格不少,二是就算面试通过了也会被排序。总之暑期和秋招对于学历差的就是及其不友好
无实习如何秋招上岸
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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