栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Python考试答案

Python考试答案

选择题
1-10: a   a   a  b  a  a  b   bc   abd     abcd

填空题
11、数组或列表
​
12、大数据方面的科学计算、数据可视化模块
​
13、while语句、for语句
​
14、PyPDF2、NLTK 、Python-docx
​
15、Python2、Python3
​
16、#
​
17、|
​
18、read_csv()、read_table()
​
19、对齐
​
20、5

问答题
21、  size=steps)# 当元素为1时,direction_steps为1,# 当元素为0时,direction_steps 为-1direction_steps = np.where(draws > 0, 1, -1)# 使用cumsum()计算步数累计和distance = direction_steps.cumsum()# 使用max()计算向前走的最远距离distance.max()# 使用min()计算向 后走的最远距离distance.min()# 15米换算成步数steps = 15/0.5(np.abs(distance) >= steps).argmax()
22、  f = open("D:/python/data.csv","r",encoding="UTF-8")lines = f.readlines()lines.reverse()for line in lines: line=line.replace("n"," ") lt = line.split(',') lt.reverse() ans = ';'.join(lt) print(ans.replace(" ",""))f.close()
23、   f=open("D:/python/score.csv")ls=[]for line in f: line = line.replace("n","") ls.append(line.split(","))print(ls)ls[0].append('总分')for i in range(len(ls)-1): sum1 = 0 for j in range(len(ls[i+1])): if ls[i+1][j].isnumeric(): sum1 = sum1 + int(ls[i+1][j]) ls[i+1].append(str(sum1))print(ls)file_new = open("D:/python/newdata.csv","w")for line in ls: file_new.write(",".join(line)+"n")f.close()file_new.close()
24、     "#Python数据分析n", "##Python数据分析n", "###Python数据分析n", "Python数据分析 n", "Python数据分析n", "_Python数据分析_n"
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/632729.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号