!e
import bisect
grades = [
(65, "D"),
(70, "C"),
(80, "B"),
(90, "A"),
]
def grade_of(score: int) -> str:
ix = bisect.bisect_right(grades, (score,))
if ix:
*_, grade = grades[ix - 1]
return grade
else:
return "F"
print(grade_of(64), grade_of(65), grade_of(66))
print(grade_of(69), grade_of(70), grade_of(71))
print(grade_of(79), grade_of(80), grade_of(81))
print(grade_of(89), grade_of(90), grade_of(91))


. and its not linked with any of my other account.


