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
点击查看答案
134. ( )求1累加到100的和,将程序写在下方:
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-c359-c01a-2cf5d6189000.html
点击查看答案
41. (单选题)ls = [25, 13, 36, 1]ls.clear()与del ls的处理结果的区别是:
A. ls.clear()只是清空列表,del ls是删除列表对象
B. ls.clear()只是删除列表对象,del ls是清空列表
C. ls.clear()与del ls的处理结果没有区别
D. ls.clear()只是清空列表,del ls是删除程序
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-072e-c01a-2cf5d6189000.html
点击查看答案
155. (判断题)列表是不可变数据类型
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-ec95-c01a-2cf5d6189000.html
点击查看答案
21. (多选题)ls为一个列表,下面正确的选项有:
A. ls.pop(0)总是可以获取去除第一个元素的列表
B. 对于空列表,ls.pop()会触发异常
C. ls[1:]都可以获取去除第一个元素的列表,列表为空时仍返回空列表
D. 对于非空列表,ls.pop(0)可以获取去除第一个元素的列表
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-dc00-c01a-2cf5d6189000.html
点击查看答案
26. (多选题)从集合中删除元素的方法有:
A. s.remove(x)
B. s.discard(x)
C. s.pop(x)
D. s.clear()
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-e784-c01a-2cf5d6189000.html
点击查看答案
113. (单选题)字符串的strip方法的作用是( )
A. 删除字符串头尾指定的字符
B. 删除字符串末尾指定的字符
C. 删除字符串头部指定的字符
D. 通过指定分隔符对字符串切片
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-9b3c-c01a-2cf5d6189000.html
点击查看答案
101. (单选题)假设从键盘输入的值是20,以下程序的输出结果是()
A. 已成年!
B. 未成年!
C. 程序运行错误
D. None
解析:答案解析:
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-82fa-c01a-2cf5d6189000.html
点击查看答案
46. (单选题)pandas中读取csv格式文件的方法为:
A. readⱣⱤexcel()
B. readⱣⱤcsv()
C. readⱣⱤsql()
D. readⱣⱤjson()
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-123d-c01a-2cf5d6189000.html
点击查看答案
32. (多选题)利用numpy读文件中的数据为数组的方法有:
A. numpy.load()
B. numpy.genfromtxt()
C. numpy.loadtxt()
D. numpy.fromtxt()
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-f409-c01a-2cf5d6189000.html
点击查看答案