计算机二级Python考试的最新动态与试题及答案
姓名:____________________
一、单项选择题(每题2分,共10题)
1.以下哪个不是Python中的基本数据类型?
A.整数(int)
B.浮点数(float)
C.字符串(str)
D.列表(list)
2.以下哪个不是Python中的运算符?
A.加(+)
B.减(-)
C.乘(*)
D.赋值(=)
3.以下哪个不是Python中的条件语句?
A.if
B.elif
C.while
D.for
4.以下哪个不是Python中的循环语句?
A.for
B.while
C.switch
D.break
5.以下哪个不是Python中的函数定义方式?
A.def函数名(参数):
...
B.函数名(参数):
...
C.function函数名(参数):
...
D.func(参数):
...
6.以下哪个不是Python中的文件操作方式?
A.open()
B.read()
C.write()
D.append()
7.以下哪个不是Python中的异常处理方式?
A.try
B.except
C.finally
D.raise
8.以下哪个不是Python中的模块导入方式?
A.import模块名
B.from模块名import函数名
C.import模块名as别名
D.from模块名import*
9.以下哪个不是Python中的列表操作方法?
A.append()
B.insert()
C.remove()
D.sort()
10.以下哪个不是Python中的字典操作方法?
A.keys()
B.values()
C.items()
D.length()
二、多项选择题(每题3分,共10题)
1.Python中的数据类型包括:
A.整数(int)
B.浮点数(float)
C.字符串(str)
D.列表(list)
E.元组(tuple)
F.集合(set)
G.字典(dict)
H.布尔值(bool)
I.None
J.分数(fraction)
2.以下哪些是Python中的运算符?
A.加(+)
B.减(-)
C.乘(*)
D.除(/)
E.幂(**)
F.求余(%)
G.取模(//)
H.比较运算符(如:==,,,!=)
I.逻辑运算符(如:and,or,not)
J.位运算符(如:,|,^)
3.以下哪些是Python中的条件语句?
A.if
B.elif
C.else
D.switch
E.case
F.for
G.while
H.do-while
I.try
J.except
4.以下哪些是Python中的循环语句?
A.for
B.while
C.do-while
D.break
E.continue
F.pass
G.return
H.yield
I.def
J.lambda
5.以下哪些是Python中常用的标准库模块?
A.math
B.random
C.os
D.sys
E.datetime
F.re
G.json
H.csv
I.sqlite3
J.urllib
6.以下哪些是Python中处理文件的方法?
A.open()
B.read()
C.write()
D.close()
E.seek()
F.tell()
G.rename()
H.delete()
I.move()
J.copy()
7.以下哪些是Python中异常处理的组成部分?
A.try
B.except
C.finally
D.raise
E.with
F.else
G.def
H.lambda
I.yield
J.return
8.以下哪些是Python中面向对象编程的概念?
A.类(class)
B.对象(object)
C.继承(inheritance)
D.多态(polymorphism)
E.封装(encapsulation)
F.属性(attribute)
G.方法(method)
H.构造函数(constructor)
I.析构函数(destructor)
J.运算符重载(operatoroverloading)
9.以下哪些是Python中列表的常用方法?
A.append()
B.insert()
C.remove()
D.sort()
E.reverse()
F.pop()
G.extend()
H.index()
I.coun