Grading Students

  • + 0 comments

    Python 3:

    def gradingStudents(grades):
        curved = []
        for grade in grades:
            if grade < 38 or grade % 5 < 3:
                curved.append(grade)
            else:
                curved.append((grade - (grade % 5)) + 5)
        return curved``