楼主: chasedreamtrue
4693 8

[SAS] base 123 三道题 [推广有奖]

  • 0关注
  • 0粉丝

本科生

78%

还不是VIP/贵宾

-

威望
0 级
论坛币
123 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
781 点
帖子
82
精华
0
在线时间
12 小时
注册时间
2007-7-30
最后登录
2010-10-24

楼主
chasedreamtrue 发表于 2008-8-25 12:03:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
109. The contents of the raw data file EMPLOYEE are listed below:<br/>----|----10---|----20---|----30<br/>Ruth 39 11<br/>Jose 32 22<br/>Sue 30 33<br/>John 40 44<br/>The following SAS program is submitted:<br/>data test;<br/>infile 'employee';<br/>input employee_name $ 1-4;<br/>if employee_name = 'Sue' then input age 7-8;<br/>else input idnum 10-11;<br/>run;<br/>Which one of the following values does the variable AGE contain when the<br/>name of the employee is "Sue"?<br/>A. 30<br/>B. 33<br/>C. 40<br/>D. . (missing numeric value)<br/>Answer: C(不知道怎末得出<br/><br/>110. The contents of the raw data file EMPLOYEE are listed below:<br/>----|----10---|----20---|----30<br/>Ruth 39 11<br/>Jose 32 22<br/>Sue 30 33<br/>John 40 44<br/>The following SAS program is submitted:<br/>data test;<br/>infile 'employee';<br/>input employee_name $ 1-4;<br/>if employee_name = 'Ruth' then input idnum 10-11;<br/>else input age 7-8;<br/>run;<br/>Which one of the following values does the variable IDNUM contain when the<br/>name of the employee is "Ruth"?<br/>A. 11<br/>B. 22<br/>C. 32<br/>D. . (missing numeric value)<br/>Answer: B(不知道怎末得出的)<br/><br/><br/>111. A SAS PRINT procedure output of the WORK.LEVELS data set is listed<br/>below:<br/>Obs name level<br/>1 Frank 1<br/>2 Joan 2<br/>3 Sui 2<br/>4 Jose 3<br/>A00-211<br/>- 34 - http://www.ePlanetLabs.com<br/>5 Burt 4<br/>6 Kelly .<br/>7 Juan 1<br/>The following SAS program is submitted:<br/>data work.expertise;<br/>set work.levels;<br/>if level = . then<br/>expertise = 'Unknown';<br/>else if level = 1 then<br/>expertise = 'Low';<br/>else if level = 2 or 3 then<br/>expertise = 'Medium';<br/>else<br/>expertise = 'High';<br/>run;<br/>Which of the following values does the variable EXPERTISE contain?<br/>A. Low, Medium, and High only<br/>B. Low, Medium, and Unknown only<br/>C. Low, Medium, High, and Unknown only<br/>D. Low, Medium, High, Unknown, and ' ' (missing character value)<br/>Answer:B(为何不是C呢)<br/><br/>谢谢<br/><br/>
二维码

扫码加我 拉你入群

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

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

关键词:Base following Procedure Character Employee Base

回帖推荐

birdnick 发表于2楼  查看完整内容

先给你回答第一个问题input employee_name $ 1-4 @@;这是input读取数据的时候,前后两个如果不加 @@,就读成两条了,

birdnick 发表于3楼  查看完整内容

第二题 跟第一个是一个问题。第三题:else if level = 2 or 3 then编译的时候,会自动将这个式子自动判断为 TRUE.所以,不会出来High 这一项你可以写 else if level =2 or level = 3 then 或者 else if level = in(2:3) thengood luck

本帖被以下文库推荐

沙发
birdnick 发表于 2008-8-25 14:40:00
<p>先给你回答第一个问题</p><p>input employee_name $ 1-4 <font color="#ff0000">@@;</font><br/></p><p>这是input读取数据的时候,前后两个如果不加 @@,就读成两条了,</p>[em01]
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

藤椅
birdnick 发表于 2008-8-25 15:36:00
<p>第二题 跟第一个是一个问题。</p><p>第三题:else if level = 2 <font color="#ff0000">or 3</font> then</p><p>编译的时候,会自动将这个式子自动判断为 TRUE.所以,不会出来High 这一项</p><p>你可以写 else if level =2 or level = 3 then 或者 else if level = in(2:3) then</p><p></p><p>good luck </p>[em01]
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

板凳
chasedreamtrue 发表于 2008-8-25 22:45:00
但是109/110还是不明白,如果不加@@的话,在109题为何读出40呢? 谢谢<br/>

报纸
birdnick 发表于 2008-8-26 00:14:00
<p>他的结果是 </p><p><font color="#ff0000">Ruth</font> 39 11<br/>Jose 32 <font color="#ff0000">22</font><br/>Sue 30 33<br/>John 40 44</p><p>input 你只是读入了name这个变量,而对于这一行后面的 你想要继续读的话 就要加 @@了,不然他会另起一行的。</p>[em01]

地板
straybird_tx 发表于 2009-6-8 14:26:00
[em17][em17]

7楼
nernernini 发表于 2009-6-9 01:28:00
thanks learning<br/>

8楼
dlmamy 发表于 2009-7-19 11:07:55

9楼
xwx1989119 发表于 2012-9-14 10:53:26
嗯,第三题,谢谢指点了,忘记优先级了,

您需要登录后才可以回帖 登录 | 我要注册

客服
GMT+8, 2026-12-4 15:46