python
Dashboard
My Repos
Compilers
Python Online
Node JS Online
Golang Online
codepy
Login
My Repos
Sign Out
Online Python Interpreter
Stop
Run
#!/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. # def gradingStudents(grades): for grade in grades: if grade < 38: print(grade) elif (((grade//5)+1)*5)-grade < 3 : print(((grade//5)+1)*5) else: print(grade) # Write your code here if __name__ == '__main__': grades_count = int(input().strip()) grades = [] for _ in range(grades_count): grades_item = int(input().strip()) grades.append(grades_item) result = gradingStudents(grades)
Share this code with others
Public
Clear
My Repos
Repo
Lang
Login
Register
Login
Create a free account. No Credit card info required.
I agree with the Codepy
Term of Service
Sign Up