B02A-2015D – Computer Sir Ki Class

Login


Lost your password?

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

Login
[lwa]



Exam Questions-CBSE12D-2015-B02A #PYTHON#6518    siteicon   siteicon  

Problem Statement - B02A-2015D

Illustrate the concept inheritance with the help of a python code

Solution

TC++ #6518

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: 12-Jan-2019 | Updated: 12-Jan-2019|CBSE12D-2015









Back