fork download
  1. def gradingStudents(grades):
  2. n = len(grades)
  3. for i in range(n):
  4. if grades[i] < 38:
  5. grades[i] += 0
  6. elif grades[i] % 5 == 3:
  7. grades[i] += 2
  8. elif grades[i] % 5 == 4:
  9. grades[i] += 1
  10. return grades
  11.  
  12. print(gradingStudents([73, 67, 38, 33]))
  13.  
  14. #https://pt.stackoverflow.com/q/485898/101
Success #stdin #stdout 0.02s 9060KB
stdin
Standard input is empty
stdout
[75, 67, 40, 33]