Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Ryerson Letter Grade by tokiojapan55
def ryerson_letter_grade(pct: int) -> str:
g = ''
for l,p1,p2,p3 in [('A',90,85,80),('B',77,73,70),('C',67,63,60),('D',57,53,50)]:
g = g if g else l+'+' if pct>=p1 else l if pct>=p2 else l+'-' if pct>=p3 else ''
return g or 'F'
July 16, 2020
Comments: