#NEWLINE# def test_grades( self ) : #NEWLINE# #INDENT# def grade( score , breakpoints = [ 60 , 70 , 80 , 90 ] , grades = 'FDCBA' ) : #NEWLINE# #INDENT# i = self . module . bisect ( breakpoints , score ) #NEWLINE# return grades [ i ] #NEWLINE# #UNINDENT# result = [ grade ( score ) for score in [ 33 , 99 , 77 , 70 , 89 , 90 , 100 ] ] #NEWLINE# self . assertEqual ( self , [ 'F' , 'A' , 'C' , 'C' , 'B' , 'A' , 'A' ] )