code: def compute_rewards(self, scores):
          
          # take the k + 1 most recent scores so we can get k velocities
          recent_scores = scores[:-self.k - 2:-1]
          velocities = [recent_scores[i] - recent_scores[i + 1] for i in
                        range(len(recent_scores) - 1)]
          # pad the list out with zeros, so the length of the list is
          # maintained
          zeros = (len(scores) - self.k) * [0]
          return velocities + zeros
docs: Compute the velocity of thte k+1 most recent scores.
  
          The velocity is the average distance between scores. Return a list with those k velocities
          padded out with zeros so that the count remains the same.