You are viewing a single comment's thread. Return to all comments →
#!/bin/python3 import sys def solve(grades): for k in range(0,n): if grades[k]<38: print(grades[k]) else: l=grades[k]/10 m=round(l) if 0.25<abs(l-m)<0.5 or 0.5<abs(l-m)<0.75: a=round(grades[k]/5) b=a*5 c=b-grades[k] if c<0: if c<-3: print(b) else: print(grades[k]) else: if c<3: print(b) else: print(grades[k]) else: f=m*10 d=f-grades[k] if d<0: if d<-3: print(f) else: print(grades[k]) else: if d<3: print(f) else: print(grades[k]) n = int(input().strip()) grades = [] grades_i = 0 for grades_i in range(n): grades_t = int(input().strip()) grades.append(grades_t) result = solve(grades) print ("\n".join(map(str, result)))
whats wrong with this pls tell me, it gives me runtime error, but passes 5 times
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 →
whats wrong with this pls tell me, it gives me runtime error, but passes 5 times