class calculator:
def __init__(self, num, operator):
self.__num = num
self.__operator = operator
def changeNum(self, newNum):
a = newNum
return a
def getNum(self):
return self.__num
def click(num):
if num == "one":
v = "1"
elif num == "two":
v = "2"
elif num == "three":
v = "3"
elif num == "four":
v = "4"
elif num == "five":
v = "5"
elif num == "six":
v = "6"
elif num == "seven":
v = "7"
elif num == "eight":
v = "8"
elif num == "nine":
v = "9"
self.__num1 = self.__num1+v
calculator = calculatorClass.calculator(self.__num1, self.__sign)
num1 = calculator.getNum()
num2 = calculator.changeNum(self.__num1)
print(num1, num2)
self.display.config(text = "a")
i trying to define two number
but when num1 = 3 ...num2 is = 3...how can i solve this problem
how can i make them into two separate number;
also i require to define a class for this calculator..can sum1 help me or give me sum hints how i going to define the class?