You are viewing a single comment's thread. Return to all comments →
def gradingStudents(grades): adjusted_grades = [] for grade in grades: next_multiple5 = ((grade//5)+1)*5 diff = next_multiple5 - grade if (grade >= 38) and (diff <3): adjusted_grades.append(next_multiple5) else: adjusted_grades.append(grade) return adjusted_grades
Seems like cookies are disabled on this browser, please enable them to open this website
Grading Students
You are viewing a single comment's thread. Return to all comments →
def gradingStudents(grades): adjusted_grades = [] for grade in grades: next_multiple5 = ((grade//5)+1)*5 diff = next_multiple5 - grade if (grade >= 38) and (diff <3): adjusted_grades.append(next_multiple5) else: adjusted_grades.append(grade) return adjusted_grades