Advertisement
Guest User

Untitled

a guest
May 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. def get_course_grade_cutoff(course):
  2.     #FIX: there now grades like A, B, C
  3.     #dumb fix for russian npoudeh cutoff, should be fixed better
  4.     synonym = u'\u041f\u0440\u043e\u0439\u0434\u0435\u043d'
  5.     if 'Pass' in course.grade_cutoffs:
  6.         return course.grade_cutoffs['Pass']
  7.     elif synonym in course.grade_cutoffs:
  8.         return course.grade_cutoffs[synonym]
  9.     else:
  10.         almost_worst_grade = sorted(course.grade_cutoffs.keys())[-2]
  11.         return course.grade_cutoffs[almost_worst_grade]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement