title: How to fix typerror dealing with '<='
body: <p>what the codes is supposed to is take the users input and then movie the rectangle around and when I run the code i get a Typeerror:&lt;=' not supported between instances of 'str' and 'int'</p>
  
  <p>these were some of the comments made on my code</p>
  
  <ol>
  <li>For both Point and Rectangle class constructors, you are providing default values for the parameters. You should not since the assignment states, you should make them required arguments. (-4)</li>
  <li>rectangleCount static attribute of the Rectangle class not kept up to date (should be incremented in the constructor to keep track of count of Rectangle objects created so far) (-2)</li>
  <li>Rectangle's constructor doesn't check if width and height is negative, and if so print error message. (-2)</li>
  <li>Calculations in the bottomRight property is incorrect. (-2) It should be</li>
  </ol>
  
  <pre><code>    @property
      def bottomRight(self):
          return Point(self.topLeft.x + self.width, self.topLeft.y + self.height)
  </code></pre>
  
  <ol start="5">
  <li>Calculations in the perimeter proper</li>
  </ol>
  
  <pre><code>    # Prog 120
      # Rectangle &amp; Point Classes
  
  
      class Point:
          def __init__(self, x, y): # makes the value required
              self.__x = x
              self.__y = y
  
          @property  # read only property for x
          def x(self):
              return self.__x
  
  
          @property  # read only property for y
          def y(self):
              return self.__y
  
          def translate(self, dx, dy):  # moves x coordinate by 'dx' amount of time  and move dy
              self.__x += dx
              self.__y += dy
  
  
      class Rectangle:
          DEFAULT_WIDTH = 1 # static attributes
          DEFAULT_HEIGHT = 1
          rectangleCount = 0
  
          def __init__(self, topLeft, width, height):
              self.__topLeft = topLeft
  
              # check width argument
              if (width &lt;= 0):
                  print("Invalid width")
                  self.__width = Rectangle.DEFAULT_WIDTH
              else:
                  self.__width = width
  
               # check height argument
              if (height &lt;= 0):
                   print("Invalid Height")
                   self.__height = Rectangle.DEFAULT_HEIGHT
              else:
                  self.__height = height
  
              Rectangle.rectangleCount +=1 #updates the count of rectangels created
  
  
          @property
          def topLeft(self):
              return self.__topLeft
  
          @topLeft.setter
          def topLeft(self, newTopLeft):
              self.__topLeft = newTopLeft
  
          @property
          def width(self):
              return self.__width
  
          @width.setter
          def width(self, newWidth):
              if (newWidth &lt;= 0):
                  print("Width cannot be less than '0'. ")
              else:
                  self.__width = newWidth
  
          @property
          def height(self):
              return self.__height
  
          @height.setter
          def height(self, newHeight):
              if (newHeight &lt;= 0):
                  print("Height cannot be less than '0'. ")
              else:
                  self.__height = newHeight
  
          @property
          def bottomRight(self):
              return Point(self.topLeft.x + self.topLeft.y + self.height)
  
          @property
          def area(self):
              return self.__width * self.__height
  
          @property
          def perimeter(self):
              return self.__width *2 + self.__height *2 
  
  
          def translate(self, dx, dy):  # moves x coordinate by 'dx' amount of time and move y
              self.__topLeft.translare(dx,dy) 
  
      def main():
          bill = Point(x="", y="")
          will = Rectangle(topLeft="", width="", height="")
          if will.width and will.height &lt; 0:
              print("Width and Height cannot be less than 0.")
              will.width = will.DEFAULT_WIDTH
              will.height = will.DEFAULT_HEIGHT
          will.rectangleCount += 1
  
      if __name__ == "__main__":
          main()
  
  </code></pre>