48. (单选题)import numpy as npprint(np.linspace(0, 10, 11))以上程序的运行结果为:
A. [ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.]
B. [ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.]
C. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
D. 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-1678-c01a-2cf5d6189000.html
点击查看答案
152. (判断题)通过insert方法可以在指定的索引位置插入元素
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-e6ed-c01a-2cf5d6189000.html
点击查看答案
147. (判断题)Python中单个字符也属于字符串类型
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-dc39-c01a-2cf5d6189000.html
点击查看答案
6. (多选题)输入一个正整数,输出小于这个数的所有奇数的和,以下程序结果正确的是:
A. n=int(input())result=0foriinrange(n):ifi%2==1:result=result+iprint(result)
B. n = int(input())result = 0for i in range(1, n):if i % 2 == 1:result = result + iprint(result)
C. n = int(input())result = 0for i in range(n):result = result + iprint(result)
D. n = int(input())print(sum([i for i in range(n) if i % 2 == 1]))
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-bc82-c01a-2cf5d6189000.html
点击查看答案
25. (多选题)创建空字典的方法为:
A. d = {}print(d)
B. d = dict()print(d)
C. d = ()print(d)
D. d = set()print(d)
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-e54f-c01a-2cf5d6189000.html
点击查看答案
14. (多选题)元组是置于圆括号中的一组数据,数据之间用逗号分隔,下面选项中的数据为元组类型的有:
A. ()
B. (1)
C. 1,
D. (1,2,3,4)
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-cd4b-c01a-2cf5d6189000.html
点击查看答案
164. (判断题)Python字典属于无序序列
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-fc88-c01a-2cf5d6189000.html
点击查看答案
84. (单选题)下列针对while的描述中,不正确的是( )
A. while可提高程序的复用性
B. while能够实现无限循环
C. while循环体里的语句可能会造成死循环
D. while循环必须提供循环次数
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-6100-c01a-2cf5d6189000.html
点击查看答案
113. (单选题)字符串的strip方法的作用是( )
A. 删除字符串头尾指定的字符
B. 删除字符串末尾指定的字符
C. 删除字符串头部指定的字符
D. 通过指定分隔符对字符串切片
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-9b3c-c01a-2cf5d6189000.html
点击查看答案
83. (单选题)如果执行 for i in range(0,10,2) 语句,则循环体执行次数是( )。
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-5ee4-c01a-2cf5d6189000.html
点击查看答案