You are viewing a single comment's thread. Return to all comments →
Python3 one-liner:
grades = [int(input()) for __ in range(int(input()))]
[print(g+5 - g%5 if g%5 > 2 and g>37 else g) for g in 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 →
Python3 one-liner:
grades = [int(input()) for __ in range(int(input()))]
[print(g+5 - g%5 if g%5 > 2 and g>37 else g) for g in grades]