S21: Tracing Algorithms Activity Page 1 of 4 128 points possible 1. A woman invests $200 on January 1 for each of three years in a fixed income bond that pays interest of 8 per cent per annum, the interest being added to her account at the end of each year. The following algorithm gives the total value of her investment after the three-year peri

Respuesta :

Algorithms are simply used as prototypes or guide of an actual program

Trace the algorithm

The complete question is added as an attachment

The variables in the algorithm are

Variables I and A

Where A represents the initial amount invested, I represents the number of years

So, the trace of the algorithm is:

  • Initialize A to 0
  • Iterate with I from 0 to 3
  • Add 200 to A
  • Multiply A by 1.08
  • Print A after the iterations

How the algorithm can be amended

From the question, the amendment of the algorithm is to print the investment after each year.

To do this, we simply include the print statement inside the loop statement

So, we have:

A = 0

FOR I = 0 TO 3

A = A + 200

A = 1.08 * A

PRINT A

NEXT I

Modify the algorithm

The modified algorithm is as follows:

A = 0

INPUT P

INPUT N

FOR I = 0 TO N

A = A + P

A = 1.08 * A

NEXT I

PRINT A

Read more about algorithms at:

https://brainly.com/question/22984934

#SPJ1

Ver imagen MrRoyal