Python Class Inheritance || House || Address || Prize || Single Inheritance || Python
In this we are going to see a basic program to get house address and prize by single inheritance in Python Programming Language.



class House():
    def __init__(self):
        print("House Class")
    def getAddress(self,addr):
        print("Address Is :",addr)
    def getPrize(self,prize):
        print("Prize Is :",prize)

class GetData(House):
    def __init__(self):
        print("Get Data Class")

g = GetData()
g.getAddress("Ram Gali, A-711, Kurla")
g.getPrize("$450000")

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post