ICode9

精准搜索请尝试: 精确搜索
  • 实验五2022-05-16 23:35:30

    with open('data3.txt','r',encoding='utf-8')as f: data=f.read().split('\n') list1=data[1:11] print("原始数据:") print(list1) list2=[] for i in list1: num=float(i) y=int(num) x=num-y

  • 实验5 文件应用编程2022-05-16 23:03:29

    with open('D:/实验五数据/data3.txt','r+', encoding='UTF-8') as f: Z=[] Y=[] x=[] for i in f: x.append(i.strip('\n')) newx=x[1:11] for i in newx: y=float(i) Y.append(y)

  • 实验五2022-05-16 23:01:10

    task3def main():    passif __name__ == '__main__':    main()with open('data3.txt','r')as f:    data=f.read().split('\n')del data[0]a=list(data)b,m=[],[]for i in data:    i=float(i)    m.append(i)    b.append(round(

  • 实验五2022-05-16 22:35:33

    task3: with open('data3.txt','r',encoding='utf-8') as f1: data=f1.read().split('\n') x=[eval(i) for i in data[1:]] print(f'原始数据:\n{x}') y=[round(i) for i in x] print(f'四舍五入后数据:\n{y}') wit

  • 实验五 文件应用编程2022-05-16 22:33:06

    task3 1 with open('data3.txt','r+', encoding='UTF-8') as f: 2 x = [line.strip('\n') for line in f] 3 x.pop(0) 4 x_print = [eval(i) for i in x] 5 print(f"原始数据:\n{x_print}") 6 x_n

  • 实验五2022-05-16 22:31:34

    with open('data3.txt','r+', encoding='UTF-8') as f: num = [line.strip('\n') for line in f] num.pop(0) num_print = [eval(i) for i in num] print(f"原始数据:\n{num_print}") num_new = [round(

  • 实验五:2022-05-16 22:01:14

    with open('data1_2.txt', 'r', encoding = 'utf-8') as f: n = 0 for line in f: if line.isspace(): continue n += 1 print(f'共{n}行') with open('data2.txt', 'r',

  • 实验五2022-05-16 21:31:41

    task2 with open('C:\\Users\\86131\\Desktop\\实验5数据文件\\实验5数据文件\\data2.txt','r',encoding='utf-8') as f: data=f.read().split('\n') unique_line=[] for line in data: if data.count(line)==1: u

  • 实验52022-05-16 21:31:23

    with open('data3.txt','r+',encoding='utf-8')as f: a=[] for i in f: i=i.strip('\n') a.append(i) a.pop(0) b=[eval(i) for i in a] print(f'原始数据:\n{b}') c=[round(eval(i)) for i in a] p

  • 实验5 文件应用编程2022-05-16 21:02:04

    1,实验任务3 1 with open('data3.txt','r',encoding='utf-8') as f: 2 data=f.read() 3 a=[] 4 data=data.split('\n') 5 for i in range(len(data)): 6 if i!=0: 7 a.append(float(data[i])) 8 print(data[0],

  • 实验五2022-05-16 20:33:04

    task3 1 with open('data3.txt','r',encoding='utf-8') as f: 2 data=f.readlines() 3 f.close() 4 with open('data3_processed.txt','w',encoding='utf-8') as b: 5 a=['四舍五入后数据:']

  • 实验52022-05-16 09:31:58

    task3 1 with open('data3.txt','r+',encoding='utf-8')as f: 2 a=[] 3 for i in f: 4 i=i.strip('\n') 5 a.append(i) 6 a.pop(0) 7 b=[eval(i) for i in a] 8 print(f'原始数据:\n{b}')

  • 实验5 文件应用编程2022-05-15 23:31:46

    3.实验任务3   f=open('data3.txt','r') g=open('data3_processed.txt','w') a=[line.strip('\n') for line in f] a.pop(0) list1=[eval(j) for j in a] print(f'原始数据:\n{list1}') list2=[round(i) for i in lis

  • 实验52022-05-15 22:35:27

    task3.py with open('data3.txt', 'r', encoding='utf-8') as f: data = f.read().split('\n') yuanshishuju = data.pop(0) data1 = [eval(i) for i in data] data2 = [round(i) for i in data1] print(f

  • 实验五2022-05-15 22:33:51

    三 1 with open('data3.txt','r+',encoding='utf-8')as f: 2 a=[] 3 for i in f: 4 i=i.strip('\n') 5 a.append(i) 6 a.pop(0) 7 b=[eval(i) for i in a] 8 print(f'原始数据:\n{b}') 9 c

  • 实验五 文件应用编辑2022-05-15 16:33:53

    with open('data3.txt','r',encoding='utf-8')as f: t=f.readlines() p=[] for i in t: if t[0]==i: y='原始数据'+'\t'+'四舍五入后数据'+'\n' p.append(y)

  • 实验五2022-05-15 16:01:32

    with open('data5.txt','r',encoding='utf-8')as f: data = f.read() line_num = len(data.splitlines()) word_num = len(data.split()) space_num = data.count(' ') totall_num = len(data) print(f'行数:{line_num}\n单

  • 实验52022-05-15 15:31:36

    task3.py with open('data3.txt','r',encoding= 'utf-8') as f: data = f.readlines() d = [eval(line) for line in data[1:]] print('原始数据: ') print(d) t = [] for i in d: x = float(i) y = int(x) if x-y

  • 52022-05-15 12:31:33

    with open('data5.txt', 'r', encoding='utf-8') as f: data = f.read() line_num = len(data.splitlines()) word_num = len(data.split()) space_num = data.count(' ') totall_num = len(data) print(f'行数:{line_num}\

  • 实验52022-05-14 20:03:36

    task3 with open('data3.txt', 'r+', encoding='utf-8')as f: a = f.read().split('\n') a[0] = '原始数据' + '\t' + '四舍五入后数据' + '\n' for i in range(1, len(a)): i

  • 实验五2022-05-14 16:32:49

    with open('data3.txt','r',encoding='utf-8') as f: data=f.readlines() f.close() with open('data3_proxessed.txt','w',encoding='utf-8') as b: a=['四舍五入后数据'] for i in range(l

  • Open CasCade中的几种类型转换(转)2022-05-14 09:02:39

    1. 将Geom_BSplineSurface转化成TopoDS_Face: Handle_Geom_BSplineSurface BSurface;BRep_Builder builder;TopoDS_Face Face;builder.MakeFace(Face,BSurface,Tolerance);2.将TopoDS_Face 转化为Geom_Surface: Handle_Geom_Surface currentSur;TopExp_Explorer Ex; Ex.Init(shape,

  • python课堂实验(6)2022-05-13 19:32:00

    第6次实验 1、计算1000以内的所有完数个数和 n = 0 for i in range(1,1001): s = 1 for j in range(2,i): if i%j == 0: s = s + j if s == i: n = n+i print('1000以内共有{}个完数'.format(n))   2、区间素数和 def lsPrime(n):

  • The Open Group Announces Launch of the TOGAF® Standard, 10th Edition2022-05-13 16:34:02

    https://www.opengroup.org/open-group-announces-launch-togaf-standard-10th-edition The Open Group Announces Launch of the TOGAF® Standard, 10th Edition New modular structure simplifies navigating and applying the framework Greater guidance for busine

  • python期末复习(7.2)2022-05-13 09:04:22

    第7章课后小测-2 1、使python脚本程序转变为可执行程序的第三方库是:pyinstall 2、不属于python的pip工具命令的是:get 3、同1 4、能支持自顶向下设计方法的是:函数 5、同4 6、对字典排序,按value从小到大排序 dt={'b':6, 'c':2, 'a':4} s=sorted(dt.items(),key= lambda x:x[1]) pri

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有