Question #281753

define a class named person with child classes named daughter and son who also have derived classes named grandson and granddaughter respectively

Expert's answer

class Person:
    def __init__(self, name):
        self.name = name
    def say_hi(self):
        print("Hello,", self.name)


class Son(Person):
    pass


class Daughter(Person):
    pass


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS