code: def compute_rewards(self, scores):
          
          for i in range(len(scores)):
              if i >= self.k:
                  scores[i] = 0.
          return scores
docs: Retain the K most recent scores, and replace the rest with zeros