B02A-2015 – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-CBSE12A-2015-B02A #PYTHON#6349    siteicon   siteicon  

Problem Statement - B02A-2015

Illustrate the concept inheritance with the help of a python code

Solution

TC++ #6349

class Base:
    def __init__ (self):
        print "Base Constructor at work..."
    def show(self):
        print "Hello Base" 
class Der(Base):
    def __init__(self):
        print "Derived Constructor at work..."
    def display(self):
        print "Hello from Derived"


Share

CSKC| Created: 11-Jan-2019 | Updated: 11-Jan-2019|CBSE12A-2015









Back