测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A40322. 有如下 Python 程序:class Car(): def __init__(self,name,color): self.name=name self.color=color def run(self): print(self.color+self.name+'is running') class Bus(Car): def __init__(self,name,color): super(…

单选题 困难

题目描述

有如下 Python 程序:

class Car():
    def __init__(self,name,color):
        self.name=name
        self.color=color
    def run(self):
        print(self.color+self.name+'is running')
class Bus(Car):
    def __init__(self,name,color):
        super().__init__(name,color)
car1=Bus('公交车','红色')
car1.run()

上述代码描述了面向对象的哪个特征?(    )

选项(单选)

上一题 下一题