知识试题解析及答案.docxVIP

  • 0
  • 0
  • 约4.86千字
  • 约 8页
  • 2026-02-27 发布于河南
  • 举报

知识试题解析及答案

姓名:__________考号:__________

题号

总分

评分

一、单选题(共10题)

1.下列哪个是Python中的基本数据类型?()

A.字符串

B.列表

C.类

D.函数

2.以下哪个不是Python的内置函数?()

A.len()

B.max()

C.input()

D.append()

3.在Python中,如何定义一个空字典?()

A.dict

B.{}

C.dictionary

D.newdict()

4.在Python中,如何获取字符串的长度?()

A.str.length

B.len(str)

C.str.size

D.str.length()

5.在Python中,如何遍历字典中的键值对?()

A.forkeyindict

B.forkey,valueindict.items()

C.forkey,valueindict

D.forkeyindict.keys()

6.在Python中,如何定义一个单行注释?()

A.//

B./**/

C.#

D.

7.在Python中,如何定义一个多行注释?()

A.//

B./**/

C.#

D.

8.在Python中

文档评论(0)

1亿VIP精品文档

相关文档