Evaluation with Hold–Attributes: Expand a Sum

Please write the programs directly into the section programs at the end of this notebook!

Problem

Suppose we want to generate the expanded form of (∑_(i = 1)^10) (i^2), i.e.

(1^2) + (2^2) + (3^2) + … + 
      (10^2)

in Mathematica. 
Write a Mathematica program that returns an expression representing the expanded sum for a summand (above: (i^2)) and a summation range (above: {i, 1, 10}) given as input to the program.

The problem:

(∑_(i = 1)^10) (i^2)

Unevaluated[(∑_(i = 1)^10) (i^2)]

FullForm[Unevaluated[(∑_(i = 1)^10) (i^2)]]

(∑_(i = 1)^10) Unevaluated[(i^2)]

Programs

Tests

i = 10;

ExpandSum[(i^4), {i, 3, 20}]