Multiple choice technology programming languages

The sasdata.banks dataset has 5 observations when the following SAS program is submitted data allobs; set sasdata.banks; capital=0; do year = 2000 to 2020 by 5; capital + ((capital + 2000) * rate); output; end; run; How many observations will the ALLOBS data set contain?

  1. 5

  2. 10

  3. 20

  4. 25

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

The outer loop runs through 5 input observations. The inner DO loop runs for year values 2000, 2005, 2010, 2015, and 2020 (5 iterations). Because the output statement is inside the DO loop, it outputs 5 observations for each of the 5 input rows, yielding 25 observations.