Overriding a Method Down the Chain
class Vehicle:
def describe(self):
return "generic vehicle"
class Car(Vehicle):
def describe(self):
return "car"
class SportsCar(Car):
pass
v = SportsCar()
print(v.describe())
What does this print?
Sign in to answer questions and track your progress
Sign In