code: def degree(self, degree_number, direction='a'):
          
          if degree_number < 1:
              raise RangeError("degree '%s' out of range" % degree_number)
          if direction == 'a':
              notes = self.ascending()[:-1]
              return notes[degree_number-1]
          elif direction == 'd':
              notes = reversed(self.descending())[:-1]
              return notes[degree_number-1]
          else:
              raise FormatError("Unrecognised direction '%s'" % direction)
docs: Return the asked scale degree.
  
          The direction of the scale is 'a' for ascending (default) and 'd'
          for descending.