Solutions - 4

1.

def __eq__(self,other):
        return True if _cmp(self,other) == 0 else False
    
    def __lt__(self,other):
        return True if _cmp(self,other) == 1 else False

    def __le__(self,other):
        return True if (_cmp(self,other) == 0 or _cmp(self,other) == 1)  else False

2.

def __add__(self,other):
        if isinstance(other, Length):
            return self.add_length(other)
        if isinstance(other,int):
            return self.add_inches(other)
        else:
            return NotImplemented

    def __radd__(self,other):
      return self.__add__(other)


Complete and Continue