Write a script file to determine how many terms are required for the sum of the series
5k2 – 2k; k = I, 2, 3…. to exceed 10,000. What is the sum for this many terms?

Solution

Because we do not know how many times we must evaluate the expression 5k2 – 2k, we use a whi Le loop. The script file is the following: