We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defgradingStudents(grades):# Write your code herediff=[]bucket=[]foriinrange(0,len(grades)):if(grades[i]>=38):#and(grades[i]%5>=3)or(grades[i]%5<3):(notnecessarycode)diff.append(math.ceil(grades[i]/5)*5)else:diff.append(grades[i])if(diff[i]-grades[i])<3:bucket.append(diff[i])else:bucket.append(grades[i])returnbucket
Cookie support is required to access HackerRank
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 →
My Python 3 solution (very crude):