Open
Description
class Eye:
def __init__(self, color):
self.color = color
class Mother(Eye):
def __init__(self, color):
super().__init__(color)
class Father(Eye):
def __init__(self, color):
super().__init__(color)
class Child(Eye):
def __init__(self, mom: Mother, dad: Father):
result = "blue"
if "brown" in [mom.color, dad.color]:
result = "brown"
super().__init__(result)
mom = Mother("blue")
dad = Father("blue")
kid = Child(mom, dad)