title: calculating the area and perimeter of a rectangle drawn in graphics.py
body: <p>I am trying to draw a rectangle with <code>graphics</code> using <code>getMouse</code> and then calculate its area and perimeter. </p>
  
  <p>I have no idea how to calculate the area or perimeter. This is what I have so far.</p>
  
  <pre><code>from graphics import *
  
  win = GraphWin("rectangle",200,200)
  
  text = Text(Point(100,50), "please click on two points.")
  text.draw(win)
  
  p1 = win.getMouse()
  p2 = win.getMouse()
  
  rectangle = Rectangle(p1,p2)
  rectangle.draw(win)
  </code></pre>