B01E-2017 – Computer Sir Ki Class

Login


Lost your password?

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

Login
[lwa]



Exam Questions-CBSE12A-2017-B01E #PYTHON#6221    siteicon   siteicon  

Problem Statement - B01E-2017

Find and write the output of the following python code:

class INVENTORY:
    def __init__(self,C=101,N="Pad",Q=100): #constructor
        self.Code=C
        self.IName=N
        self.Qty=int(Q);
    def Procure(self,Q):
        self.Qty = self.Qty + Q
    def Issue(self,Q):
        self.Qty -= Q
    def Status(self):
        print self.Code,":",self.IName,"#",self.Qty
I1=INVENTORY()
I2=INVENTORY(105,"Thumb Pin",50)
I3=INVENTORY(102,"U Clip")
I1.Procure(25)
I2.Issue(15)
I3.Procure(50)
I1.Status()
I3.Status()
I2.Status()

Solution

TC++ #6221


Share

CSKC| Created: 10-Jan-2019 | Updated: 10-Jan-2019|CBSE12A-2017









Back