n = int(input())
grades = []
for _ in range(n):
grades.append(int(input()))
def gradingStudents(grades):
for i in grades:
if i > 37 and (5-i) % 5 < 3:
print (i + (5-i) % 5)
else:
print (i)
result = gradingStudents(grades)
print(map(str,result))
If I change the printing method, it works fine but when I try printing with:
print(map(str,result))
it raises an error:
TypeError: 'NoneType' object is not iterable
I also tried with return
but still won't work. Any help would be appreciated.