title: Points within a rectangle
body: <p>I have a point and rectangle class. I am trying to write a function in the rectangle class that will check if the point is in the rectangle, but I am getting syntax errors.</p>
  
  <pre><code>class Point(object):
      def __init__(self, x=0, y=0):
         self.x = x
         self.y = y
  
      def __str__(self):
         return "({},{})".format(self.x, self.y)
  
  class Rectangle(object):
     def __init__(self, posn, w, h):
        self.corner = posn
        self.width = w
        self.height = h
  
     def __str__(self):
        return "({0},{1},{2})".format(self.corner, self.width, self.height)
     def contains(self):
        if self.x &lt; self.width and self.y &lt; self.height:
           return True
        else:
           return False
  </code></pre>