nerdexam
SAS_Institute

A00-201 · Question #76

Which one of the following SAS programs created this data set? capacity airplaneType staff 150 Large 10

The correct answer is B. data work.test; capacity = 150; if 100 le capacity le 200 then do; airplaneType = 'Large'; staff = 10; end; else do; airplaneType = 'Small'; staff = 5; end; run. See the full explanation below for the reasoning.

Question

Which one of the following SAS programs created this data set? capacity airplaneType staff 150 Large 10

Options

  • Adata work.test; capacity = 150; if 100 le capacity le 200 then airplaneType = 'Large' and staff = 10; else airplaneType = 'Small' and staff = 5; run;
  • Bdata work.test; capacity = 150; if 100 le capacity le 200 then do; airplaneType = 'Large'; staff = 10; end; else do; airplaneType = 'Small'; staff = 5; end; run;
  • Cdata work.test; capacity = 150; if 100 le capacity le 200 then do; airplaneType = 'Large'; staff = 10; end; else do; airplaneType = 'Small'; staff = 5; end; run;
  • Ddata work.test; capacity = 150; if 100 le capacity le 200 then airplaneType = 'Small'; airplaneType = 'Small'; staff = 5; else airplaneType = 'Large'; airplaneType = 'Large';

How the community answered

(53 responses)
  • A
    13% (7)
  • B
    77% (41)
  • C
    6% (3)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full A00-201 Practice