title: Print statement inside method
body: <p>So I am trying to write make a function that will initialize two points and output previously made methods. </p>
  
  <p>Partial code below:</p>
  
  <pre><code>    class Point(Geometry):
  next_id = 0
  def __init__(self,x,y,):
      self.x = x
      self.y = y
      self.id = Point.next_id
      Point.next_id += 1  
  def __str__(self):
      return "(%0.2f, %0.2f)" % (self.x, self.y)
  
  def quadrat(self):
          if (self.x &gt; 0 and self.y &gt; 0):
              return "Quad I"
          elif (self.x &lt; 0 and self.y &gt; 0):
              return "Quad II"
          elif (self.x &lt; 0 and self.y &lt; 0):
              return "Quad III"
          elif (self.x &gt; 0 and self.y &lt; 0):
              return "Quad IV"
          elif (self.x == 0 and self.y == 0):
              return "Origin"        
          elif (self.x == 0):
              return "Y-axis"
          elif (self.y == 0):
              return "X-axis"
  
  def distance(p0, p1):
      dist = math.sqrt((p0.x - p1.x)**2 + (p0.y - p1.y)**2)
      return dist
  
  def equality():
          if (self.x == self.y):
              print "True"
          else:
              print "False"  
  
  def identify():
          if(p0.id == p1.id):
              print "True"
          else:
              print "False"
  def pointTest():
      global P1,P2
      P1 = Point(-3,-3)
      P2 = Point(0,0)
      print "P1) ID =", P1.id,", Coordinates=", P1,", Location=",P1.quadrat()
      print "P2) ID =", P2.id,", Coordinates=", P2,", Location=",P2.quadrat()
      print "Distance between",P1,"and",P2,"is %0.2f" % (P1.distance(P2))
      print "P1==P2?",P1==P2
      print "P1 same as P2?",P1.id==P2.id    
  
  P1 = None    
  P2 = None    
  print pointTest()
  </code></pre>
  
  <p>When my points are defined outside the method and when the <code>print</code> statements are outside the method, my output comes out perfectly.</p>
  
  <p>But I need the points to be initialized in the method and my <code>print</code> statement to be within the method as well.</p>
  
  <p>When I call it, I get the error that <code>pointTest</code> is not defined.</p>
  
  <p>My output needs to look like this:</p>
  
  <pre><code>&lt;&lt;&lt;&lt; print pointTest
  </code></pre>
  
  <p>Which will give me the answers to my print statements.</p>