Sum of Series ( n ^ 2 | function that calculate the sum of the nth series ; Using formula of the nth term ; Driver function
def sum_series ( n ) : NEW_LINE INDENT nSquare = n * n NEW_LINE return int ( nSquare * ( nSquare - 1 ) / 4 ) NEW_LINE DEDENT n = 2 NEW_LINE print ( sum_series ( n ) ) NEW_LINE