def __floordiv__(self, b): # override the built-in function floordiv # return the integer division of the two value # genBase to int tmp1 = self.todecimal() tmp2 = b.todecimal() return genBase(10, str(tmp1//tmp2))
def __mul__(self, b): # override the built-in function mul # return the multiplication of the two value # genBase to int tmp1 = self.todecimal() tmp2 = b.todecimal() return genBase(10, str(tmp1*tmp2))
def __add__(self, b): # override the built-in function add # return the sum of the two value # genBase to int tmp1 = self.todecimal() tmp2 = b.todecimal() return genBase(10, str(tmp1+tmp2))
def __sub__(self, b): # override the built-in function sub # return the substraction of the two value # genBase to int tmp1 = self.todecimal() tmp2 = b.todecimal() return genBase(10, str(tmp1-tmp2))
def __mod__(self, b): # override the built-in function mod # return the mod of the two value # genBase to int tmp1 = self.todecimal() tmp2 = b.todecimal() return genBase(10, str(tmp1%tmp2))