Breaking the Records

  • + 0 comments
    def breakingRecords(scores):
        count_max=count_min=0
        minimum=maximum=scores[0]
        for i in range(1,len(scores)):
            if scores[i]<minimum:
                count_min+=1
                minimum=scores[i]
            if scores[i]>maximum:
                count_max+=1
                maximum=scores[i]
        array_break=[count_max, count_min]
        return array_break