Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in the appendix.
  1. Which statement is false regarding the use of DO loops?
    1. They can contain conditional clauses.
    2. They can generate multiple observations.
    3. They can be used to combine DATA and PROC steps.
    4. They can be used to read data.
  2. During each execution of the following DO loop, the value of Earned is calculated and is added to its previous value. How many times does this DO loop execute?
    data finance.earnings; 
       Amount=1000; 
       Rate=.075/12; 
       do month=1 to 12; 
          Earned+(amount+earned)*rate; 
       end; 
    run;
    1. 0
    2. 1
    3. 12
    4. 13
  3. On January 1 of each year, $5000 is invested in an account. Complete the DATA step below ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.