title: Some of are my attributes are set as not defined when I try to use classes ad inheritance
body: <p>When I try to run this code:</p>
  
  <pre><code>class Person:
  
      def __init__(self, name, age, height):
          self.name = name
          self.age = age
          self.height = height
  
      def __str__(self):
          return "Name: {}, Age: {}, Height: {}".format(self.name, self.age, self.height)
  
      def get_older(years):
          self.age += years
  
  class Worker(Person): 
  
      def __init__(self, name, age, height, salary):
          super(Worker, self).__init__(name, age, height)
          self.salary = salary 
  
      def calc_yearly_salary(self):
          return salary * 12
  
  worker1 = Worker('Henry', 42, 178, 3350)
  print(worker1)
  print(worker1.calc_yearly_salary())
  </code></pre>
  
  <p>It doesn´t recognize the attribute salary giving me the following error saying that "salary" is not defined:</p>
  
  <pre><code>runfile('C:/Users/Jorge87/Desktop/Master Tema 1.5/inheritance_practice.py', 
  wdir='C:/Users/Jorge87/Desktop/Master Tema 1.5')
  Name: Henry, Age: 42, Height: 178
  Traceback (most recent call last):
  
  File "&lt;ipython-input-11-07b76e08cf24&gt;", line 1, in &lt;module&gt;
  runfile('C:/Users/Jorge87/Desktop/Master Tema 1.5/inheritance_practice.py', 
  wdir='C:/Users/Jorge87/Desktop/Master Tema 1.5')
  
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 
  827, in runfile
  execfile(filename, namespace)
  
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 
  110, in execfile
  exec(compile(f.read(), filename, 'exec'), namespace)
  
  File "C:/Users/Jorge87/Desktop/Master Tema 1.5/inheritance_practice.py", line 32, in &lt;module&gt;
  print(worker1.calc_yearly_salary())
  
  File "C:/Users/Jorge87/Desktop/Master Tema 1.5/inheritance_practice.py", line 28, in 
  calc_yearly_salary
  return salary * 12
  
  NameError: name 'salary' is not defined
  </code></pre>
  
  <p>What is wrong with my code? Also, it doesn´t seem to recognize the attribute "years" in the defined variable "get_older(years)"</p>