Problem Statement - B02B-2019S-C1
class Box: #Line 1 L=10 #Line 2 TYpe="HARD" #Line 3 def __init__(self, T, TL=30): #Line 4 self.Type = T #Line 5 self.L = TL #Line 6 def Disp(self): #Line 7 print self.Type, Box.Type #Line 8 print self.L,Box.L #Line 9 B1=Box("SOFT",20) #Line 10 B1.Disp() #Line 11 Box.Type="FLEXI" #Line 12 B2=Box("HARD") #Line 13 B2.Disp() #Line 14
Write the output of the above Python code.
Solution
CSKC| Created: 10-Apr-2019 | Updated: 10-Apr-2019|CBSE12A-2019