全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
6994 15
2015-01-05
各位前辈,楼主处于48小时最后突击SAS base考试,看到模拟题123中三道题不太明白为什么是那几个答案,希望过来人可以指教一二,在此谢过!

QUESTION 72
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(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

Q:不明白为什么是D, 不明白题目中的感叹号的作用什么......

QUESTION 73
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country= substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?

A. 6 B. 7 C. 17 D. 25

Answer: D

Q:这个完全不知道25是怎么算出来的

QUESTION 74
The following SAS program is submitted:
data work.test;
Title = 'A Tale of two Cities, Charles j.Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

A. T
B. of
C. Dickens
D. ' ' (missing character value)

Answer: B

Q:这道题里面scan(title,3,',')已经说了dml是逗号,怎么在scan title的时候直接锁定了of,我觉得是missing啊


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-1-5 13:54:32
用SAS 9.3运行第72题结果是(结果中就带空格):Ipswich         ; England

也不是答案啊
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-5 15:25:18
感叹号的作用什么...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-6 03:11:13

QUESTION 74
The following SAS program is submitted:
data work.test;
Title = 'A Tale of two Cities, Charles j.Dickens';
Word = scan(title,3,' ,');
run;
这里scan(title,3,' ,'); 是空格和逗号,不是只有逗号
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-6 03:23:29
第一题里面D逗号前面应该是有几个空格的(B则没有),两个感叹号和||是一样的,表示字符的连接
第二题和第一题是一样的,自己可以数数 Ipswich         ; England
第三题分隔符可以不止一个 Word = scan(title,3,'×&% ,'); 里面四个符号都可以是分隔符
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-1-6 03:30:40
QUESTION 72
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country= City!!'; '!!'England';
run;

这里City = substr(First,1,7);后, City 是和First同样长度。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群