- 2
- 0
- 约3.74千字
- 约 11页
- 2026-07-14 发布于福建
- 举报
第PAGE页共NUMPAGES页
2026年计算机二级考试Python编程实操技能题库
一、选择题(每题2分,共20分)
共10题,每题2分。
1.在Python中,下列哪个语句可以正确地导入math模块?
A.importmath
B.includemath
C.requiremath
D.loadmath
2.下列哪个不是Python的内置数据类型?
A.list
B.dictionary
C.array
D.tuple
3.如何在Python中判断一个变量是否为空?
A.`ifvar==null`
B.`ifvarisNone`
C.`ifnotvar`
D.`ifvar==False`
4.下列哪个方法可以用来删除字典中的所有键值对?
A.`dict.clear()`
B.`dict.delete()`
C.`dict.removeAll()`
D.`dict.empty()`
5.在Python中,如何反转一个字符串?
A.`string[::-1]`
B.`string.reverse()`
C.`string[::-2]`
D.`string.reverseString()`
6.下列哪个是Python中的异常处理语句?
A.`try...catch`
B.`try..
原创力文档

文档评论(0)