문제풀이/기타
SAS BASE Q56. le & ge
나루다루
2018. 10. 31. 22:48
728x90
QUESTION NO: 56
The following SAS program is submitted:
data test;
set sasuser.employees;
if 2 le years_service le 10 then amount = 1000;
else amount = 0;
amount_per_year = years_service / amount
run;
What is the value of the variable AMOUNT_PER_YEAR if an employee has been with the company for one year?
A. 0
B. 0.001
C. 1
D. . (missing numeric value)
Answer: D
# 문제 풀이
- 2<= years_service <= 10이면 amount에 1000을 할당하고, 아니면 amount에 0을 할당
- years_service=1이므로 amount=0이다.
- amount=0이 분모에 있으므로 계산결과는 무한대이다. 따라서 표시할 수 없으므로 결측
728x90
반응형