Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

SINGLE INHERITANCE

SOURCE CODE:
class bgs:

def __init__(self):

self.ask=''

def Input_data(self):

self.ask=raw_input('Enter the detail you want to know:')

def Display(self):

print 'Processing data about', self.ask, '....'

class grnd(bgs):

def __init__(self):

self.info=''

def Input(self):

self.info=raw_input('Please confirm your choice:')

def Show(self):

print 'Your', self.ask, 'Is under renewation.'

print 'It will take 20 days to be completed.'

print "It is at it's last phases."

print '''Sports played here are:

Football

Tennis

Cricket

Skating
Badminton

Basketball'''

o=grnd()

o.Input_data()

o.Input()

o.Display()

o.Show()

OUTPUT:

You might also like