Code:
class calculator():
def __init__(self,x=0,y=0):
self.first=x
self.second=y
#calculator.param=+theta
def scaleparam(self,theta):
self.theta=theta
return self.theta
def addition(self,theta):
self.addition1=(self.first+self.second)*self.scaleparam(theta)
return self.addition1
check1=calculator(3,4)
check1.scaleparam(10)
print "the addition1 is "+str(check1.addition())
Comment