Multiple choice technology programming languages

The SAS dataset BANKS is listed below: BANKS name rate Capital 0.0718 Direct 0.0721 Virtual 0.0567 The following SAS program is submitted: data newbank; do year =1 to 3; set banks; capital + 5000; end; run; Which one of the following represents how many observations and variables will exist in the SAS dataset NEWBANK?

  1. 0 observations and 0 variables

  2. 1 observation and 4 variables

  3. 3 observatiosn and 3 variables

  4. 9 observations and 2 variables

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

The DO loop executes 3 times inside the DATA step. The set banks statement reads an observation on each iteration. Since banks has 3 observations, the third iteration reads the last one. The step then ends, outputting 1 observation with variables name, rate, capital, and year (4 variables total).