Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Vehicle:
- def __init__(self):
- self.type=None
- self.name=None
- self.color=None
- self.max_speed=None
- class Car(Vehicle):
- def __init__(self):
- Vehicle.__init__(self)
- class Byke(Vehicle):
- def __init__(self):
- Vehicle.__init__(self)
- myCar = Car()
- myCar.max_speed = 180
- yourByke = Byke()
- yourByke.max_speed = 60
- print(myCar.max_speed)
- print(yourByke.max_speed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement