175k views
3 votes
How many steps does this program contain?

data national;
set sashelp.baseball;
BatAvg=nHits/nAtBat;
run;

proc contents data=national;
run;

proc print data=national;
run;

proc means data=national;
var BatAvg;
run;

a. one
b. two
c. four
d. eight

User Zevan
by
7.3k points

1 Answer

6 votes

Final answer:

The program contains four steps: data declaration and assignment, calculation of Batting Average, displaying dataset contents, and calculating the mean Batting Average c. four.

Step-by-step explanation:

The program contains four steps:

  1. Declaration of the variable and assignment of a dataset to it: data national; set sashelp.baseball;
  2. Calculation of Batting Average using the formula: BatAvg=nHits/nAtBat;
  3. Displaying the contents of the 'national' dataset: proc contents data=national;
  4. Calculating the mean of Batting Average in the 'national' dataset: proc means data=national; var BatAvg;

User Monmonja
by
8.4k points