Problem Statement - B01E-2015
Find and write the output of the following python code:
class Emp: def __init__(self,code,nm): #constructor self.Code=code self.Name=nm def Manip (self) : self.Code=self.Code+10 self.Name='Karan' def Show(self,line): print self.Code,self.Name,line s=Emp(25,'Mamta') s.Show(1) s.Manip() s.Show(2) print s.Code+len(s.Name)
Solution
CSKC| Created: 11-Jan-2019 | Updated: 11-Jan-2019|CBSE12A-2015