In this we are going to see a program of grandchild class using hierarchical inheritance in Python Programming Language.
class Child:
def func3(self):
print("this is function three")
class gchild1(Child):
def func4(self):
print("this is function four")
class gchild2(Child):
def func5(self):
print("this is function five")
gc1 = gchild1()
gc2 = gchild2()
gc1.func3()
gc2.func3()
# Coded by Saahil
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP