• + 0 comments

    In Python 3:

    def breakingRecords(scores):
        highest = scores[0]
        lowest = scores[0]
        count_highest = 0
        count_lowest = 0
        for i in scores:
            if i > highest:
                highest = i
                count_highest += 1
            elif i < lowest:
                lowest = i
                count_lowest += 1
        return count_highest, count_lowest