关于SAS BASE 中218中的疑问,麻烦高手来解答一下
QUESTION NO: 7
The following SAS program is submitted:
data one;
addressl = ‘214 London Way’;
run;
data one;
set one;
address = tranwrd(address1, ‘Way’, ‘Drive’); run;
What are the length and value of the variable ADDRESS?
A. Length is 14; value is ‘214 London Dri’.
B. Length is 14; value is ‘214 London Way’.
C. Length is 16; value is ‘214 London Drive’.
D. Length is 200; value is ‘214 London Drive’.
此题答案选D,我觉得是不是选A 因为address的length在set one语句出现时就限定了,和214 London Way一样长,于是最后output中也该是14于是选A啊 麻烦解答为何选D
QUESTION NO: 20
Given the SAS data set PRICES:
PRICES
Prodid priceproducttypesalesreturns
K1255.10NETWORK152
B132S 2.34HARDWARE30010
R18KY2 1.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
The following SAS program is submitted:
data hware inter cheap;
set prices(keep = productype price);
if producttype = ‘HARDWARE’ then output hware;
else if producttype = ‘NETWORK’ then
output inter;
if price le 5.00;
run;
How many observations does the HWARE data set contain?
A. 0
B. 2
C. 3
D. 4
Answer: D 此题和70题中一题目很像,不过if price le 5.00; 放在了最后而不是在70题中的最前面于是答案吗就选择了D 而不是B。 但是if price le 5.00; 放哪效果不是一样的吗???其他的output都应该是它的子集啊,难道此题不该还是选B??麻烦高手们解答一下
有哪些高手做过sas base的218题啊 有没有答案详解啊 麻烦发来看看