Multiple choice technology programming languages

banks {x y} {1 A} {2 B} {3 C} data newbank; set banks; do year=1 to 3; capital + 5000; end; run; What is the value of capital and year for the last observation?

  1. 15000,4

  2. 45000,3

  3. 15000, 3

  4. 45000 , 4

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

This SAS data step processes 3 observations. For each observation, the DO loop runs 3 times (year=1 to 3), adding 5000 to capital each iteration. Total: 3 observations × 3 iterations × 5000 = 45000. The year variable ends at 4 after the loop completes its final iteration.