python for everybody quiz_【题解】Quiz: Python for Everybody - A Review (Capstone: Retrieving, Processin...

吐槽:有些题想记录一下哈,很少有前面没做过的。

题目&我想说的:

1. Where in the computer is a variable such as "X" stored?

x = 123

A. Input Devices

B. Main Memory

C. Secondary Memory

D. Central processing unit

E. Output Devices

随机存取存储器(英语:Random Access Memory,缩写:RAM),也叫主存,是与CPU直接交换数据的内部存储器。它可以随时读写(刷新时除外),而且速度很快,通常作为操作系统或其他正在运行中的程序的临时数据存储介质。RAM工作时可以随时从任何一个指定的地址写入(存入)或读出(取出)信息。它与ROM的最大区别是数据的易失性,即一旦断电所存储的数据将随之丢失。RAM在计算机和数字系统中用来暂时存储程序、数据和中间结果。

2. What is the answer to this question?

A. 64

B. 100

C. 3

D. 42

E. 75

第一次答错了,但是错后提示是Douglas Adams,于是我查了一下这个人(http://muchong.com/html/201202/9630444.html),哎,没听前两周的课直接做的题,估计就是在这里给错过了。

3. In the following example, an error occurs in "line3" that normally causes a traceback if it were not in a try/except.

line1

try:

line2

line3

line4

except:

line5

line6

What is the sequence of lines executed in this program?

A. line1, line5, line6

B. line1, line2, line3, line5, line6

C. line1, line2, line3, line6

D. line1, line4, line5, line6

E. line1, line2, line3, line4, line5, line6

如果出错也算运行的话,那就一定知道答案了。

4. How is a Python socket different than a Python file handle?

A. The socket does not read all of the data when it is opened

B. You can read and write using the same socket

C. Opening a socket will never fail, while opening a file can fail

排除法选什么~

5. Which of the following lines of Python code contains a syntax error?

x = 12

if x < 5:

print("smaller")

else:

print("bigger")

print("all done")

这个题是个填空题有点坑,我以为是把错误的代码内容写出来,然后错了就去论坛找了下。助教说不允许讨论答案,但是提示了答案是一个数字。

最后想说:

这个专项课程终于学完了,虽然确实有点唯题是图,但是确实在此过程中我也学到很多,第一二周的基础内容话不多说,第三四周的网页爬虫和数据库操作让我从0了解了大概的用法,第五周的内容是几个project,还没仔细看呢,倒是写完week1的quiz突然就得到了证书。还是挺感慨的,老爷爷讲的真的很深入浅出。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值