- 3
- 0
- 约5.84千字
- 约 16页
- 2026-06-16 发布于福建
- 举报
第PAGE页共NUMPAGES页
2026年计算机编程入门:Python编程基础模拟题
一、选择题(共10题,每题2分,合计20分)
考察内容:Python基础语法、数据类型、控制结构
1.在Python中,以下哪个语句是正确的字符串定义方式?
A.`str=Hello`
B.`str=Hello`
C.`str=Helloworld`
D.`str=Hello`
2.以下哪个数据类型是不可变的?
A.列表(List)
B.元组(Tuple)
C.字典(Dictionary)
D.集合(Set)
3.在Python中,如何正确地注释一行代码?
A.`//Thisisacomment`
B.`#Thisisacomment`
C.`/Thisisacomment/`
D.`!--Thisisacomment--`
4.以下哪个关键字用于定义Python中的类?
A.`class`
B.`def`
C.`struct`
D.`interface`
5.在Python中,如何获取当前日期和时间?
A.`datetime.now()`
B.`time.now()`
C.`date.today()`
D.`datetime.get_time()`
6.以下哪个方法用于向列表
原创力文档

文档评论(0)