You are viewing a single comment's thread. Return to all comments →
Nice. I think it is little bit more readaable if you use the same approach but use a single modulus:
return [max(n, 5 - (n % 5) + n) if n > 37 else n for n in grades]
(Sorry format as code button is missing from editor)
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 →
Nice. I think it is little bit more readaable if you use the same approach but use a single modulus:
return [max(n, 5 - (n % 5) + n) if n > 37 else n for n in grades]
(Sorry format as code button is missing from editor)