第11432题 单选题
Python子类Student继承Person时,空白处应填什么正确初始化子类实例?

在一个学校管理系统中,有基类Person表示人员,有属性name和age,子类Student继承自Person,并额外有属性student_id。现有如下代码:

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age
class Student(Person):
    def __init__(self, name, age, student_id):
        ____
        self.student_id = student_id
# 创建学生实例
student = Student("小明", 18, "001")
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析