Created
June 2, 2019 06:36
-
-
Save brydavis/4db9445c43b534a5e10eb4cc7fb040c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Athlete: | |
def __init__(self): | |
pass | |
def breathe(self): | |
print("I am breathing") | |
def eat(self): | |
print("I am eating") | |
def sleep(self): | |
print("I am sleeping") | |
def train(self): | |
print("I am training") | |
class Runner(Athlete): | |
def __init__(self): | |
pass | |
def run(self): | |
print("I am running") | |
class Cyclist(Athlete): | |
def __init__(self): | |
pass | |
def cycle(self): | |
print("I am riding my bike") | |
class Swimmer(Athlete): | |
def __init__(self): | |
pass | |
def swim(self): | |
print("I am swimming") | |
class Triathlete(Runner, Cyclist, Swimmer): | |
def train(self): | |
pass # ???? | |
tri = Triathlete() | |
tri.breathe() # from Person | |
tri.sleep() # from Person | |
tri.eat() # from Person | |
tri.run() # from Runner | |
tri.cycle() # from Cyclist | |
tri.swim() # from Swimmer | |
tri.train() # ???? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment