B02D-2019S-C1 – Computer Sir Ki Class

Login


Lost your password?

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

Login
[lwa]



Exam Questions-CBSE12A-2019-B02D-C1 #PYTHON#7114    siteicon   siteicon  

Problem Statement - B02D-2019S-C1

Answer the questions(i) to (iii) based on the following:

class Furniture(object) :             #Line 1
  def __init__(self,Q) :                   #Line 2
    self.Qty = Q 
  def GetMore(self,TQ) :                   #Line 3
    self.Qty =self.Qty+TQ
  def FRDisp(self):                        #Line 4
    print self.Qty

class Fixture(object):                     #Line 5
  def __init__(self,TQ):                   #Line 6
    self.Qty=TQ
  def GetMore (self, TQ):                  #Line 7
    self.Qty = self.Qty_TQ
  def FXDisp(self):                        #Line 8
    print self .Qty
Class Flat (Furniture, Fixture):           #Line 9
  def __init__(self, fno):                 #Line 10
    self,Fno=fno
    Q=0
    if self.Fno<100:
    Q=10
    else:
    Q=20
    Furniture.__init__(self, Q):            #Line 11
    Fixture.__init__(self,Q):               #Line 12
  def More(self,Q):                         #Line 13
    Furniture.GetMore(self,Q
    Fixture.GetMore(self,Q)
  def FLDisp(self):                         #Line 14
    print self.Fno,
    Furniture.FRDisp(Self)
    Fixture.FXDisp(self)
    Fl=FLAT(101)                            #Line 15

(i) Write the type of the inheritance illustrated in the above.
(ii) Find and write the output of the above code.
(iii) What is the difference between the statements shOwn in Line 11 and Line ?

Solution

TC++ #7114


Share

CSKC| Created: 11-Apr-2019 | Updated: 11-Apr-2019|CBSE12A-2019









Back