第41609题 单选题
为了让 Dog 类的构造函数能正确地调用其父类 Animal 的构造方法,横线线处应填入( )。
class Animal:
    def __init__(self, name: str):

        self.name = name
        print("Animal created")

    def speak(self) -> None:
        print("Animal speaks")

class Dog(Animal):
    ______________________________
        print("Dog created")

    def speak(self) -> None:
        print("Dog barks")

if __name__ == "__main__":
    animal: Animal = Dog("Rex", "Labrador")
    animal.speak()
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析