- 0
- 0
- 约4.96千字
- 约 14页
- 2026-11-09 发布于山东
- 举报
2026年计算机二级Python模拟卷八
姓名:_____?准考证号:_____?得分:______
一、单选题(总共10题,每题2分)
1.在Python中,以下哪个语句可以正确地创建一个空列表?
A.`list=()`
B.`list=[]`
C.`list={}`
D.`list=`
2.以下哪个函数用于计算列表中所有元素的总和?
A.`min()`
B.`max()`
C.`sum()`
D.`average()`
3.在Python中,如何正确地使用`try-except`语句来捕获并处理异常?
A.`try{code}catch(Exceptione){code}`
B.`try:codeexceptExceptionase:code`
C.`try:codecatchExceptione:code`
D.`try:codefinally:code`
4.以下哪个模块用于处理日期和时间?
A.`math`
B.`datetime`
C.`time`
D.`calendar`
原创力文档

文档评论(0)