计算机程序设计(Python)-21级 (南京信息工程大学)

  • 实验五

    1 with open('data3.txt','r',encoding='utf-8')as f: 2 data=f.read().strip().split('\n') 3 data[0]='原始数据'+'\t'+'四舍五入后数据'+'\n' 4 for i in range(1,len(dat
    张博睿   2022-05-15 21:54   0   4
  • 实验五

    实验三 with open('data3.txt', 'r+', encoding = 'utf-8') as f,open('data3_processed.txt', 'r+', encoding = 'utf-8') as ff: num=[line.strip('\n') for line
    Lil不要被人喂啦   2022-05-15 21:03   0   8
  • 实验5

    实验任务3 with open('data3.txt','r',encoding='utf-8')as f: data=f.read() with open('data3.txt','r',encoding='utf-8')as f: data1=f.readlines() data0=[line.
    202183360008仲苏洋   2022-05-15 19:51   0   7
  • 实验5

    实验任务3: 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) else: y=
    刘封云   2022-05-15 19:40   0   5
  • 实验5

    with open('./files/data3.txt',encoding='utf-8',mode='r') as f: lines=f.readlines() result=['四舍五入后数据'] for i in range(len(lines)): lines[i]=lines[i].st
    严成娜   2022-05-15 17:59   0   5
  • 实验5

    task3. mport math f1=open('D:\\data3.txt','r') list1,list2=[],[] for line in f1.readlines(): line=line.strip('\n') list1.append(line) print(list1[0])
    李禹灼   2022-05-15 16:47   0   7
  • 实验五

    with open('data3.txt','r',encoding='utf-8')as f: data=f.read().strip().split('\n') data[0]='原始数据'+'\t'+'四舍五入后数据'+'\n' for i in range(1,len(data)): dat
    稀音络合物   2022-05-15 16:41   0   12
  • 实验五 文件应用编辑

    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) else: y=i.strip
    小黑酱   2022-05-15 16:18   0   3
  • 实验五

    with open('data3.txt', 'r', encoding='utf-8') as f: data = f.read().strip().split('\n') data[0] = '原始数据' + '\t' + '四舍五入后数据' + '\n' for i in range(1, l
    希木子   2022-05-15 16:16   0   6
  • 实验5

    实验任务3: with open('data3.txt','r',encoding='utf-8') as f : with open('data3_processed.txt', 'w', encoding='utf-8') as f1: data=f.read().strip().split('
    金子航   2022-05-15 16:13   1   5