The Grading students problem is the basic problem in which we have to print the grades of students according to the given situation this is an easy problem.

HackerLand University has the following grading policy:

• Every student receives a grade in the inclusive range from 0 to 100.

Sam is a professor at the university and likes to round each student’s grade according to these rules:

• If the difference between the grade and the next multiple of 5 is less than 3, round up to the next multiple of 5.
• If the value of grade is less than 38, no rounding occurs as the result will still be a failing grade.

For example, grade = 84 will be rounded to 85 but 29 will not be rounded because the rounding would result in a number that is less than 40.

Given the initial value of grade for each of Sam’s n students, write code to automate the rounding process.

#### Simple Array Sum HackerRank Function Description:

Complete the function gradingStudents in the editor below. It should return an integer array consisting of rounded grades.

#### Input Format

The first line contains a single integer, n, the number of students.
Each line i of the n subsequent lines contains a single integer, grades[ i ], denoting student i‘s grade.

#### Output Format

For each grades[ i ], print the rounded grade on a new line.

```4
73
67
38
33```

#### Sample Output

```75
67
38
33```

Explanation

1. Student 1 received a 73, and the next multiple of 5 from 73 is 45. Since 75 – 73 < 3, the student’s grade is rounded to 75.
2. Student 2 received a 67, and the next multiple of 5 from 67 is 70. Since 70 – 67 = 3, the grade will not be modified and the student’s final grade is 67.
3. Student 3 received a 38, and the next multiple of 5 from 38 is 40. Since 40-38<3, the student’s grade will be rounded to 40.

#### Grading Students HackerRank Solution in Python:

```#!/bin/python3

import math
import os
import random
import re
import sys

#
# Complete the 'gradingStudents' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts INTEGER_ARRAY grades as parameter.
#

x=[]
if i<38 or i%5<3:
x.append(i)
else:
x.append((i-(i%5))+5)

return x
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')

fptr.write('\n'.join(map(str, result)))
fptr.write('\n')

fptr.close()```