title: Why don't setters and getters work as expected?
body: <p>This is my first question on Stackoverflow and this is an assignment I am working on. I have exhausted all of my other options before asking for your help.</p>
  
  <p>The code is to create a class that will ask the user to input their pets name, age, and type, and to return the results using the accessor method. This is my first class assignment and I cannot get it to print or return the input. If someone could please explain to me where my problem is, and to point me in the right direction. I'm not sure if my class is wrong, fields, getters, or setters. I feel like I made a simple mistake somewhere and I can't figure it out.</p>
  
  <p>This is python 2.7</p>
  
  <pre><code>#Pet class
  
  
  class Pet():
      def __init__(self, name, typea, age):
          self.name = name
          self.typea = typea
          self.age = age
  
  def main():
      pet_name =raw_input('What is your pets name? ')
      pet_typea =raw_input('What type of animal is your pet? ')
      pet_age =raw_input('What is your pets age? ')
  
      def __setName__(self, n):
          self.name = n
      def __getName__(self, n):
          return self.n
  
      def __setTypea__(self, t):
          self.typea = t
      def __getTypa__(self, t):
          return self.t
  
      def __setAge__(self, a):
          self.age = a
      def __getAge__(self, a):
          return self.a
  
  main()
  </code></pre>