Driver Code
arr = [ 1 , 2 , 3 , 4 , 5 ] NEW_LINE n = len ( arr ) NEW_LINE calculatePrefixSum ( arr , n ) NEW_LINE print ( findMean ( 0 , 2 ) ) NEW_LINE print ( findMean ( 1 , 3 ) ) NEW_LINE print ( findMean ( 0 , 4 ) ) NEW_LINE