#NEWLINE# @ cached_property #NEWLINE# def q1( self ) : #NEWLINE# #INDENT# rounds = self . rounds #NEWLINE# data = self . sorted_data #NEWLINE# if ( rounds == 1 ) : #NEWLINE# #INDENT# return data [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( rounds % 2 ) : #NEWLINE# #INDENT# ( n , q ) = ( ( rounds // 4 ) , ( rounds % 4 ) ) #NEWLINE# if ( q == 1 ) : #NEWLINE# #INDENT# return ( ( 0.25 * data [ ( n - 1 ) ] ) + ( 0.75 * data [ n ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( 0.75 * q [ n ] ) + ( 0.25 * data [ ( n + 1 ) ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return statistics . median ( data [ : ( rounds // 2 ) ] )