• + 0 comments
        rounded_grades = []
        for grade in grades:
            if grade >= 38:
                remainder = grade % 5
                multiple5 = grade + (5 - remainder)
                if multiple5 - grade < 3:
                    grade = multiple5
            rounded_grades.append(grade)
        return rounded_grades