Anonymous
public python v1 · immutableclass MyNumber: def __init__(self, x, y): self.x = x self.y = y def equal(self): if self.x == self.y: print self.x, 'is equal to', self.y else: print self.x, 'is not equal to', self.y def greater(self): if self.x > self.y: print self.x, 'is > than', self.y else: print self.x, 'is not > than', self.y def less(self): if self.x < self.y: print self.x, 'is < than', self.y else: print self.x, 'is not < than', self.yx = MyNumber(45, 100)x.equal()x.greater()x.less()