MULTIPLE INHERITANCE
SOURCE CODE:
class company:
def __init__(self):
self.company=''
self.branch=''
def inputdata(self):
self.company=raw_input('Enter company name:')
self.branch=raw_input('Enter company branch:')
def display(self):
print 'Company name is', self.company
print 'Company branch is', self.branch
class distributer:
def __init__(self):
self.distributer=''
self.id=0
def accept(self):
self.distributer=raw_input('Enter name of distributer:')
self.id=input('Enter distributer ID:')
def show(self):
print 'Distributer name is', self.distributer
print 'Distributer ID is', self.id
class sale(company, distributer):
def __init__(self):
self.stock=''
self.sale=0.0
def take(self):
self.stock=raw_input('Enter the total stock:')
self.sale=input('Enter total sale:')
def present(self):
print 'Total stock is', self.stock
print 'Total sale is', self.sale
c=sale()
c.inputdata()
c.display()
c.accept()
c.show()
c.take()
c.present()
OUTPUT: