- 1
- 0
- 约4.38千字
- 约 10页
- 2026-05-11 发布于北京
- 举报
90+上岸学姐整理2025计算机二级Python历年真题
一、单项选择题,(总共10题,每题2分)
1.下列Python代码执行后,输出结果为?
a=123
b=int(a)+5
print(type(b))
A.classstr
B.classint
C.classfloat
D.classlist
2.下列关于列表操作的代码,执行后列表lst的结果是?
lst=[1,2,3,4]
lst.pop(1)
lst.append(5)
lst.insert(2,6)
A.[1,3,6,4,5]
B.[1,3,4,6,5]
C.[1,2,6,4,5]
D.[1,3,4,5,6]
3.字符串s=helloworld!,执行s.strip().split()后,得到的列表是?
A.[hello,world!]
B.[hello,world!]
C.[helloworld!]
D.[hello,world]
4.下列循环执行后,sum的结果是?
sum=0
foriinrange(1,6,2):
sum+=i
A.9
B.10
C.8
D.7
5.函数定义deffunc(a,b=10,args):,下列调用方式错误的是?
原创力文档

文档评论(0)