楼主: mich_ard
1528 2

[问答] 求助:SAS 220题中的一个问题 [推广有奖]

  • 0关注
  • 2粉丝

本科生

46%

还不是VIP/贵宾

-

威望
0
论坛币
69 个
通用积分
2.0088
学术水平
18 点
热心指数
18 点
信用等级
17 点
经验
1203 点
帖子
63
精华
0
在线时间
114 小时
注册时间
2016-10-12
最后登录
2017-11-10

楼主
mich_ard 发表于 2016-10-20 02:42:49 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
SAS 220题的214:

这题的iteration让我费解,与普通的do loop的iteration很不同。有谁能不能解释一下这个sixth iteration”是指哪一步?(最好能详细一点,对于这一题,我甚至都不知道哪个是第一个iteration,第二个iteration ... )。 谢谢。

214. After the value for
code is read in the sixth iteration, which illustration of the program data vector is correct?

1---+----10---+----20---+----30

H Lettuce

P Green Leaf  Quality Growers

P Iceberg     Pleasant Farm

P Romaine     Quality Growers

H Squash

P Yellow      Tasty Acres

P Zucchini    Pleasant Farm


data perm.produce (drop=code);   infile orders;   
retain Vegetable;   
input code $1. @;   
if code='H' then input @3 vegetable $6.;   
if code='P';   
input @3 Variety : $10.  @15 Supplier : $15.;
run;
proc print data=perm.produce;

run;

a.  
_N_

Vegetable

code

Variety

Supplier

6


P




b.  
_N_

Vegetable

code

Variety

Supplier

6

Squash

P




c.  
_N_

Vegetable

code

Variety

Supplier

6

Squash

H




d.  
_N_

Vegetable

code

Variety

Supplier

6

Squash

H

Yellow



答案:B




二维码

扫码加我 拉你入群

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

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

关键词:illustration iteration Vegetable Supplier variety 考试题目 correct

沙发
cx112722000 发表于 2016-10-20 09:44:56
有人問過了https://bbs.pinggu.org/thread-4746254-1-1.html
因为程序里面有retain vegetable 这句话. 所以 vegetable这个变量在没有被改写之前还是保持着前一个iteration时的值. 题目中说第六次iteration只读到code, 也就是还没读到第六行的其他值, 因此vegetable这个变量依然保持着在第5次iteration 的值, 也就是squash. 因为其他变量还没读到,所以为缺失值.
第五次iteration不会出现B答案, 因为在第五次iteration的时候code 为 H

藤椅
mich_ard 发表于 2016-12-7 01:53:46
cx112722000 发表于 2016-10-20 09:44
有人問過了https://bbs.pinggu.org/thread-4746254-1-1.html
因为程序里面有retain vegetable 这句话. 所以 ...
xiexie

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-25 15:53