- 1、本文档共28页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1.what does the following code
1.what does the following code do?(B)
def a(b, c, d): pass
defines a list and initializes it
defines a function, which does nothing
defines a function, which passes its parameters through
defines an empty class
2.what gets printed? Assuming python version 2.x(
2.what gets printed? Assuming python version 2.x(A)
print type(1/2)
type int
type number
type float
type double
type tuple
3. what is the output of the following code?
3. what is the output of the following code?(E)
print type([1,2])
type tuple
type int
type set
type complex
type list
4. what gets
4. what gets printed?(C)
def f(): pass print type(f())
type function
type tuple
type NoneType
type str
type type
5. what should the below code print?(
5. what should the below code print?(A)
print type(1J)
type complex
type unicode
type int
type float
type dict
6. what is the output of the following code?(
6. what is the output of the following code?(D)
print type(lambda:None)
type NoneType
type tuple
type type
type function
type bool
7. what is the output of the below program?(
7. what is the output of the below program?(D)
a = [1,2,3,None,(),[],]
print len(a)
A.syntax error B.4
C.5
D.6
E.7
8.what gets printed? Assuming python version 3.x(
8.what gets printed? Assuming python version 3.x(C)
print (type(1/2))
type int
type number
type float
type double
type tuple
9. What gets
9. What gets printed?(C)
d = lambda p: p * 2 t = lambda p: p * 3 x = 2
x = d(x)
x = t(x)
x = d(x) print x
A.7 B.12 C.24 D.36 E.48
10. What gets
10. What gets printed?(A)
x = 4.5
y = 2 print x//y
A.2.0
B.2.25
C.9.0 D.20.25 E.21
11. What gets
11. What gets printed?(C)
nums = set([1,1,2,3,3,3,4])
print len(nums)
A.1
B.2
C.4
D.5
E.7
12. What gets
12. What gets printed?(A)
x = True
y = False z = False
if x or y and z:
print yes
else:
print no
A.yes B.no
C.fails to compile
13.
13. What gets printed?(C)
x = True y = False z = False
if not x or y:
print 1
elif not x or not y and z: print 2
elif
elif not x or y or not y and
您可能关注的文档
- ProE格利森螺旋锥齿轮的画法.docx
- proe关系式分析和总结.docx
- proe有限元分析材料.docx
- Project2013教程分析和总结.docx
- Protel 99 SE软件中添加Spice仿真器件模型的方法.docx
- Protel 99 SE实用 教程教学大纲.docx
- Protel99SE绘制PCB过程详解.docx
- protel99se原理图转换PDF文档.docx
- protel99快捷键大全大全.docx
- Proteus Relay中继电器的使用和仿真.docx
- 2025年全国统考教师资格考试《教育教学知识与能力(小学)》模拟试题及参考答案详解【B卷】.docx
- 数智赋能下大中小学思政课一体化建设探索.docx
- 2025年全国统考教师资格考试《教育教学知识与能力(小学)》模拟试题及参考答案详解【培优】.docx
- 2025年全国统考教师资格考试《教育教学知识与能力(小学)》模拟试题及1套参考答案详解.docx
- T∕CWAN 0060-2022 大厚度铝合金窄间隙激光填丝焊接推荐工艺规范.docx
- 2025年全国统考教师资格考试《教育教学知识与能力(小学)》模拟试题【能力提升】附答案详解.docx
- 2025年全国统考教师资格考试《教育教学知识与能力(小学)》模拟试题【有一套】附答案详解.docx
- 公路建设:施工管理精要-探索成功的关键因素与应对挑战.pptx
- 国际职业教育合作对本土教育改革的启示.docx
- 2025年全国统考教师资格考试《教育教学知识与能力(小学)》模拟试题【研优卷】附答案详解.docx
文档评论(0)