You are viewing a single comment's thread. Return to all comments →
def complement(x, m): return (m - (x % m)) % m
def gradingStudents(grades): result = [grade if grade<38 or grade%5<3 else grade + complement(grade, 5) for grade in grades] return result
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 complement(x, m): return (m - (x % m)) % m
def gradingStudents(grades): result = [grade if grade<38 or grade%5<3 else grade + complement(grade, 5) for grade in grades] return result