SAS中文论坛

标题: 请教两题123的题目 [打印本页]

作者: shiyiming    时间: 2009-3-30 10:10
标题: 请教两题123的题目
QUESTION 110
The contents of the raw data file EMPLOYEE are listed below:
----|----10---|----20---|----30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
in file' employee';
input employee_ name $ 1-4;
if employee_ name = 'Ruth' then input idnum 10-11;
else input age 7-8;
run
Which one of the following values does the variable IDNUM contain when the name
of the employee is "Ruth"?
A. 11
B. 22
C. 32
D. . (missing numeric value)
Answer: B

为什么结果是下一个observation的值?

QUESTION 111
A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:
Obsname level
1 Frank 1
2 Joan 2
3 Sui 2
4 Jose 3
5 Burt 4
6 Kelly .
7 Juan 1
The following SAS program is submitted:
data work . expertise;
set work. levels;
if level = . then
expertise = 'Unknown';
else if level = 1 then
expertise = 'Low';
else if level = 2 or 3 then
expertise =' Medium';
else
expertise = 'High';
run;
Which of the following values does the variable EXPERTISE contain?
A. Low, Medium, and High only
B. Low, Medium, and Unknown only
C. Low, Medium, High, and Unknown only
D. Low, Medium, High, Unknown, and ' ' (missing character value)
Answer: B

为什么不出现High? 那level=4时,expertise是什么?
作者: shiyiming    时间: 2009-4-3 09:54
标题: Re: 请教两题123的题目
Question110:
如果 input employee_ name $ 1-4 @@;
就是你想的Answer: A

Question111:
如果 else if (level = 2) or (level=3) then .../else if level in (2 3)  then ..        
就是你想的Answer: Level=4 ->High
作者: shiyiming    时间: 2009-4-4 02:26
标题: Re: 请教两题123的题目
Question 110
如果你不加@在input statement 的最后, 下一个 input statement会读取下一行的数据。所以Ruth读了Jose 的 idnum 。
Question 111
"if level = 2 or 3"means "if level = 2 or if  3".  非0的数字就代表True. 在这里,判断总是为True,因为3是大于1的。所以 除了 level = .和level = 1以外,所有level都会让expertise =' Medium'。"else expertise = 'High';" 不会执行.
作者: shiyiming    时间: 2009-4-30 01:26
标题: 好心人可以发一份 SAS ADV123 给我?
好心人可以发一份给我 SAS ADV123?

thanks!!    <!-- e --><a href="mailto:nancyjin28@yahoo.com">nancyjin28@yahoo.com</a><!-- e -->
作者: shiyiming    时间: 2009-5-8 03:56
标题: Re: 请教两题123的题目
please send me copy too. Thanks,

<!-- e --><a href="mailto:qing_l@hotmail.com">qing_l@hotmail.com</a><!-- e -->
作者: shiyiming    时间: 2009-6-2 00:18
标题: Re: 请教两题123的题目
I'm preparing the test too, can you send me a copy of &quot;123 questions&quot;, thanks a lot.
<!-- e --><a href="mailto:will_gao@yahoo.com.cn">will_gao@yahoo.com.cn</a><!-- e -->
作者: shiyiming    时间: 2009-6-8 08:51
标题: Re: 请教两题123的题目
我刚开始准备,能否给我发一份123的题目?非常感谢!xhzhenyu@gmail.com
作者: shiyiming    时间: 2009-7-16 10:32
标题: Re: 请教两题123的题目
if level=2 or 3   无论level的值是什么  都是真的   因为等价于if   level=2   or   3=3   ;无论level值是什么,3=3表达式一定是真的  。所以当level=4时,也不会出现high
作者: shiyiming    时间: 2009-7-19 10:55
标题: Re: 请教两题123的题目
Would you send me a copy of SAS base 123? Appreciate! <!-- e --><a href="mailto:dlmamy@163.com">dlmamy@163.com</a><!-- e -->
作者: shiyiming    时间: 2009-7-19 14:49
标题: Re: 请教两题123的题目
相信您已经得到答案。我也想考。您能好心把这份123题发一份给我吗&gt; 我的邮件: <!-- e --><a href="mailto:saslearner2006@gmail.com">saslearner2006@gmail.com</a><!-- e -->

多谢!




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2