|
|
|
|
|
|
i**********a 发帖数: 32 | 1 马上就要考试了,base 123题中还有几题没有弄清楚,希望能得到大家的解答。谢谢!
17. The contents of two SAS data sets named EMPLOYEE and SALARY are listed
below:
EMPLOYEE SALARY
name age name salary Bruce 30 Bruce 40000
Dan 35 Bruce 35000
Dan 37000
Dan.
The following SAS program is submitted: data work.empsalary;
merge work.employee (in = inemp)
work.salary (in = insal);
by name;
if inemp and insal; run;
How many observations will the data set WORK.EMPSALARY contain?
A. 2
B. 4
C. 5
D. 6
为什么选B?
57. The SAS data set named WORK.TEST is listed below: capacity airplanetype
staff
150 Large 10
Which one of the following SAS programs created this data set?
A. data work.test; capacity = 150;
if 100 le capacity le 200 then A00-211
- 18 - http://www.ePlanetLabs.com airplanetype = 'Large' and staff= 10; else airplanetype = 'Small' and staff= 5; run;
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;
C. data work.test; capacity = 150;
if 100 le capacity le 200 then
do;
airplanetype = 'Large'; staff= 10;
else
do;
airplanetype = 'Small'; staff= 5;
end;
run;
D. data work.test; capacity = 150;
if 100 le capacity le 200 then; airplanetype = 'Small';
staff= 5; else;
airplanetype = 'Large'; staff= 10;
run;
为什么选B,不选A?
68. The following SAS program is submitted: data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department then payroll = O;
payroll + wagerate; if last.department;
run;
The SAS data set WORK.SALARY, currently ordered by
DEPARTMENT, contains 100 observations for each of 5 departments.
Which one of the following represents how many
observations the WORK.TOTAL data set contains?
A. 5
B. 20
c. 100
D. 500
为什么答案是A, 不是D?
72. The following SAS program is submitted: data work. test;
First = 'Ipswich, England'; City = su bstr( First,1,7);
City_Country =City!!', '!!'England'; run;
Which one of the following is the value of the variable CITY_COUNTRY in the
output data set?
A. Ipswich!!
B. Ipswich, England
C. Ipswich, 'England'
D. Ipswich , England
为什么答案是D, 不是B?
谢谢大家! | l******9 发帖数: 48 | 2 17题,不知道是不是排版问题,我觉得Dan 37000这个obs应该是在salary这个dataset
里,这样才会有四个obs。
57题,给variable赋值一定是分开的语句,不能用and同时给两个variable赋值。
68题,if last.department 这后面应该是省了一个 then output是可以不写出来的。
这个我是猜的,不然这个语句总觉得没说完。
72题,B选项的Ipswich前面有个空格。这题应该是用来练眼神的。。。
我也准备考呢,说得不对的欢迎版上大牛指教。 | t********o 发帖数: 369 | 3 check out this website. there are some comments that I found helpful.
http://sas.1or9.com/archives/category/sas-base-questions/ | w**********i 发帖数: 4 | 4 为什么第68题不选D呢?
dataset
【在 l******9 的大作中提到】 : 17题,不知道是不是排版问题,我觉得Dan 37000这个obs应该是在salary这个dataset : 里,这样才会有四个obs。 : 57题,给variable赋值一定是分开的语句,不能用and同时给两个variable赋值。 : 68题,if last.department 这后面应该是省了一个 then output是可以不写出来的。 : 这个我是猜的,不然这个语句总觉得没说完。 : 72题,B选项的Ipswich前面有个空格。这题应该是用来练眼神的。。。 : 我也准备考呢,说得不对的欢迎版上大牛指教。
| w**********i 发帖数: 4 | 5 第72题,感觉City_Country =City!!', '!!'England'; run;这句,连接符后面的引号
里面包含了一个逗号加一个space,而D选项里面逗号后没有space。不知道这个是不是
typo啊。
dataset
【在 l******9 的大作中提到】 : 17题,不知道是不是排版问题,我觉得Dan 37000这个obs应该是在salary这个dataset : 里,这样才会有四个obs。 : 57题,给variable赋值一定是分开的语句,不能用and同时给两个variable赋值。 : 68题,if last.department 这后面应该是省了一个 then output是可以不写出来的。 : 这个我是猜的,不然这个语句总觉得没说完。 : 72题,B选项的Ipswich前面有个空格。这题应该是用来练眼神的。。。 : 我也准备考呢,说得不对的欢迎版上大牛指教。
| l******9 发帖数: 48 | 6 if last.department的意思就是只保留是最后一个department的obs到新dataset里,总
共有5个department所有就只有5个obs。这个语句跟
data one;
set two;
by department;
if last.department;
run;
输出结果应该是一样的,你可以试试。
【在 w**********i 的大作中提到】 : 为什么第68题不选D呢? : : dataset
| l******9 发帖数: 48 | 7 就算有space那也是在逗号之后,B选项是第一个词前面有个space,这个肯定是不对的
【在 w**********i 的大作中提到】 : 第72题,感觉City_Country =City!!', '!!'England'; run;这句,连接符后面的引号 : 里面包含了一个逗号加一个space,而D选项里面逗号后没有space。不知道这个是不是 : typo啊。 : : dataset
|
|
|
|
|
|
|