EFO while scanning triple-quoted string litera; 오보

1203 단어 Python오보
#   EFO while scanning triple-quoted string litera;  
Effect1 = 1.0
for i in range(365):
    Effect1 = Effect1 * (1 + 0.01)
#print("{:.2f}".format(Effect1))

'''def Effect2(rate):
    Effect2 = 1.0

    for i in range(365):
        if i % 7 in [6,0]:
            Effect2 = Effect2 * (1 - 0.01)
        else:
            Effect2 = Effect2 * (1 + rate)
    return Effect2

rate = 0.01    
while Effect2(rate) < Effect1:
    rate += 0.001
    
print("{:.3f}".format(rate))

이 코드 오류, EFO while scanning triple-quoted string litera;
인용부호 문자열 검색 시 EOF
따옴표
수정 코드는 다음과 같습니다.
#EFO while scanning triple-quoted string litera;       
Effect1 = 1.0
for i in range(365):
    Effect1 = Effect1 * (1 + 0.01)
#print("{:.2f}".format(Effect1))

'''def Effect2(rate):
    Effect2 = 1.0

    for i in range(365):
        if i % 7 in [6,0]:
            Effect2 = Effect2 * (1 - 0.01)
        else:
            Effect2 = Effect2 * (1 + rate)
    return Effect2

rate = 0.01    
while Effect2(rate) < Effect1:
    rate += 0.001
    
print("{:.3f}".format(rate))
''' #     ,       

좋은 웹페이지 즐겨찾기