B01E-2015 – Computer Sir Ki Class

Login


Lost your password?

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

Login
[lwa]



Exam Questions-CBSE12A-2015-B01E #PYTHON#6345    siteicon   siteicon  

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

TC++ #6345

25 Mamta 1
35 Karan 2
40


Share

CSKC| Created: 11-Jan-2019 | Updated: 11-Jan-2019|CBSE12A-2015









Back