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

  • 实验5

    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 = [ro
    戎梓瑞   2022-05-14 10:40   0   14
  • 实验五

    with open('data3.txt', 'r', encoding = 'utf-8') as f: data2= [line.strip('\n') for line in f] num=[eval(i) for i in data2[1:]] print(f'原始数据是:\n{num}')
    苏萌0017   2022-05-13 19:56   0   9
  • 实验5 文件应用编程

    with open('D://aa//data3.txt','r',encoding='utf-8')as f: data=f.read().split('\n') list1=data[1:11] print("原始数据:") print(list1) list2=[] for i in list
    琦哲   2022-05-13 18:31   0   15
  • 实验五

    3 with open('data3.txt','r') as f: yuanshi=f.readlines() yuanlist=[] pro=[] for i in yuanshi: j=i.strip('\n') if j=='原始数据': pass else: yuanlist.append
    沉迷学习ing   2022-05-12 22:34   0   10
  • 实验5 文件应用编程

    实验内容 实验任务1 略 实验任务2 略 实验任务3 1 def task3(): 2 with open("/Users/chenxi/Documents/文稿 - 陈曦的MacBook Air - 1/python data/实验5数据文件/data3.txt" 3 ,"r",encoding=
    灯下白头人   2022-05-12 11:41   0   14
  • 实验5

    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
    JskyR   2022-05-12 11:10   0   27
  • 实验5

    测试1 with open('data1_1.txt', 'r', encoding = 'utf-8') as f: data = f.readlines() n = 0 for line in data: if line.strip('\n') == '': continue n += 1 pr
    zlmk   2022-05-12 10:01   0   7
  • 实验5 文件应用编程

    实验任务3: 1 with open('data3.txt','r',encoding='utf-8') as f: 2 date=[] 3 for line in f.readlines(): 4 line=line.strip() 5 date.append(line) 6 date.pop(0
    暮渎   2022-05-11 23:48   1   19
  • 实践5

    # task_5 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 = d
    奈落——   2022-05-11 23:31   4   18
  • 实验5 文件应用编程

    任务1 1_1 with open('data1_1.txt','r',encoding = 'utf-8') as f: data = f.readlines() n = 0 for line in data: if line.strip('\n')=='': continue n+=1 prin
    马可菠萝堡   2022-05-11 22:07   0   18