Multiple choice technology programming languages

Which of the following would you use to compare the result of investing $X a year for 6 years in three different banks that compound interest monthly? Assume a fixed rate for the 6-year period.

  1. DO WHILE statement

  2. nested DO loops

  3. a DO group

  4. DO UNTIL statement

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Evaluating the investment requires iterating across multiple dimensions: the three different banks, the six years of investment, and the twelve monthly compounding periods per year. Nested DO loops are necessary to handle these multiple levels of iteration, whereas single DO groups, DO WHILE, or DO UNTIL statements cannot easily manage multi-layered loops.