code: def polarity(self):
      
      scores = [w.polarity for w in self.words if w.polarity != 0]
      if not scores:
        return 0.0
      return sum(scores) / float(len(scores))
docs: Return the polarity score as a float within the range [-1.0, 1.0]