class Vehicle: def __init__(self, make, model): self.make = make self.model = model def start_engine(self): print("Engine started!") class Car(Vehicle): def __init__(self, make, model, color): super().__init__(make, model) self.color = color def start_engine(self): super().start_engine() print("Car engine started!") my_car = Car("Toyota", "Camry", "Blue") my_car.start_engine()
Engine started! Car engine started!