편집 기록

편집 기록
  • 프로필 nowp님의 편집
    날짜2020.06.17

    파이썬 텍스트 파일에서 수치를 읽어, 합계와 평균을 구하기.


    이미지

    inFp = None
    outFp = None
    
    inFp = open('data.txt', 'r')
    outFp = open('output.txt', 'w')
    
    score = inFp.readlines()
    score = list(map(float, score))
    scoresum = 0
    
    for i in score :
        scoresum = scoresum + i
    average = scoresum / len(score)
    

    여기서부터 어떻게 해야 할지 고민됩니다.
    여러번 고쳐봐도 안됩니다.

  • 프로필 엽토군님의 편집
    날짜2020.06.16

    파이썬 텍스트 파일


    이미지

    inFp = None
    outFp = None
    
    inFp = open('data.txt', 'r')
    outFp = open('output.txt', 'w')
    
    score = inFp.readlines()
    score = list(map(float, score))
    scoresum = 0
    
    for i in score :
        scoresum = scoresum + i
    average = scoresum / len(score)
    

    여기서부터 어떻게 해야 할지 고민됩니다.
    여러번 고쳐봐도 안됩니다.

  • 프로필 알 수 없는 사용자님의 편집
    날짜2020.06.16

    파이썬 텍스트 파일


    이미지

    inFp = None outFp = None

    inFp = open('data.txt', 'r') outFp = open('output.txt', 'w')

    score = inFp.readlines() score = list(map(float, score)) scoresum = 0

    for i in score : scoresum = scoresum + i average = scoresum / len(score)

    여기서부터 어떻게 해야 할지 고민됩니다. 여러번 고쳐봐도 안됩니다.