- 1
- 0
- 约4.33千字
- 约 8页
- 2026-09-11 发布于山东
- 举报
手动模式不会自动联动
姓名:__________考号:__________
一、单选题(共10题)
1.以下哪个选项表示在Python中定义一个函数的关键字?()
A.define
B.function
C.def
D.func
2.在Python中,如何注释一行代码?()
A.//注释
B./*注释*/
C.#注释
D.注释
3.以下哪个不是Python中的基本数据类型?()
A.int
B.float
C.list
D.string
4.在Python中,如何获取字符串的长度?()
A.length(str)
B.len(str)
C.size(str)
D.count(str)
5.以下哪个是Python中的无限循环结构?()
A.whileTrue
B.foriinrange(10)
C.ifcondition
D.switchcase
6.在Python中,如何将一个整数转换为字符串?()
A.int(str)
B.str(int)
C.to_string(int)
D.convert(int)
7.以下哪个是Python中的列表推导式?()
A.listcomprehension
B.forloop
C.whileloo
原创力文档

文档评论(0)