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

  • 实验五

    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 i
    黄海祥   2022-05-16 22:53   1   2
  • 实验5 文件应用编程

    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)
    赵跃箐   2022-05-16 22:50   0   2
  • 实验5 文件应用编程

    task1with 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
    乐长森   2022-05-16 22:34   0   3
  • 实验五

    任务三: with open('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.a
    不太妙哈   2022-05-16 22:34   0   1
  • 实验五

    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"原始数据:
    Saloi   2022-05-16 22:24   0   5
  • 实验五 文件应用编程

    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
    周俊西   2022-05-16 22:23   0   6
  • 实验五

    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) fo
    天天三顿   2022-05-16 22:20   0   2
  • 实验5 文件应用编程

    task3.py file1=open('D://data3.txt','r',encoding='utf-8') ls1=[] ls=[] ls2=[] d1=file1.readlines() for i in d1[1:]: i=i.strip('\n') ls1.append(i) prin
    星标g   2022-05-16 21:59   0   2
  • 实验五:

    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',
    其米卓嘎   2022-05-16 21:53   0   2
  • 实验5 文件应用编程

    task3.py 1 with open('data3.txt','r+', encoding='UTF-8') as f: 2 Z=[] 3 Y=[] 4 x=[] 5 for i in f: 6 x.append(i.strip('\n')) 7 newx=x[1:11] 8 for i in
    虞渊   2022-05-16 21:45   0   6