47. (单选题)import numpy as npprint(np.array([1, 2, 3, 4]))以上程序的运行结果为:
A. [ 1, 2, 3, 4]
B. [1 2 3 4]
C. 1 2 3 4
D. 1, 2, 3, 4
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-1456-c01a-2cf5d6189000.html
点击查看答案
43. (单选题)列表ls = [['Tom', 24], ['Jack', 18], ['Ada', 20]]中的每个子列表第二个元素为年龄,按年龄排序输出,正确的程序是:
A. ls = [['Tom', 24], ['Jack', 18], ['Ada', 20]]ls.sort()print(ls)
B. ls = [['Tom', 24], ['Jack', 18], ['Ada', 20]]ls.sort(key=lambda x: x[1])print(ls)
C. ls = [['Tom', 24], ['Jack', 18], ['Ada', 20]]ls.sort(key=lambda x: x[0])print(ls)
D. ls = [['Tom', 24], ['Jack', 18], ['Ada', 20]]ls.sort(key=lambda x: x[2])print(ls)
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-0bea-c01a-2cf5d6189000.html
点击查看答案
76. (单选题)字典类型主要是根据键来提取对应值,通过赋值操作可以实现字典元素的增添和修改,若对于字典Dict={2:two,3:three ,1:one,}进行操作Dict[1]=One,此时字典Dict将会变为( )(注意,下面选项不考虑顺序性)。
A. {2:'two', 3:'One', 1:'one'}
B. {2:'two', 3:'three', 1:'One'}
C. {2:'two', 3:'three', 1:'one', 1:'One'}
D. {2:'One', 3:'three', 1:'one'}
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-4ff1-c01a-2cf5d6189000.html
点击查看答案
85. (单选题)以下选项中不符合 Python 语言变量命名规则的是( )
A. TempStr
B. 3ⱣⱤ1
C. ⱣⱤAl
D. l
解析:答案解析:
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-62cc-c01a-2cf5d6189000.html
点击查看答案
50. (单选题)以下( )不是Python 的特性。
A. 收费使用
B. 跨平台
C. 可拓展
D. 可嵌入
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-1b2a-c01a-2cf5d6189000.html
点击查看答案
186. (填空题)函数可以有多个参数,参数之间使用( )分隔
https://www.shititong.cn/cha-kan/shiti/000dded1-b61f-2a1e-c01a-2cf5d6189000.html
点击查看答案
45. (单选题)有一个字符串'10111100',则set('10111100')的结果为:
A. {'1', '0', '1', '1', '1', '1', '0', '0'}
B. {'0', '1'}
C. '10111100'
D. 10111100
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-1014-c01a-2cf5d6189000.html
点击查看答案
58. (单选题)若要获取两个集合A和B的并集,在Python 中应该使用( )
A. B
B. A+B
C. A|B
D. A^B
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-2b1e-c01a-2cf5d6189000.html
点击查看答案
70. (单选题)DataFrame中,在原数据基础上添加一行新数据,使用的方法为()
A. extend()函数
B. append()函数
C. insert()函数
D. drop()函数
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-437a-c01a-2cf5d6189000.html
点击查看答案
39. (单选题)num = 3.00001284print("{:.3f}".format(num))运行结果的输出为:
A. 3.0
B. 3.000
C. 3.00
D. 3.00001284
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-037f-c01a-2cf5d6189000.html
点击查看答案