inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

SyntaxError: unexpected EOF while parsing 괄호가 어디가 이상한지 모르겠습니다.

591

성균관대학교최현진

작성한 질문수 1

0

def SequentialSearch (arraytarget):
   global found
   found=[]
   count= pos = 0 
   while pos < len(array) :
        if eval(array[pos][4])<=target:     # 총 당류 비교
           count+=1
           found.append(food_list[pos][4])  
        elsepass
        pos +=1
   print(f'탐색 성공횟수 : {count}')

del food_list[0]     #항목명 지움
target = eval(input ('총당류 범위 고르기 ~이하 :  '))
SequentialSearch(food_list,target)
print(f'{target}당류에 맞는 음식은')
for i in found:
    print(i, end='/')
실행해보니
총당류 범위 고르기 ~이하 :  3
  File "<string>", line 1
    -
    ^
SyntaxError: unexpected EOF while parsing

도저히 못찾겠습니다 ㅜㅜ

EOFwhileparsing

답변 0

오타 제보

2

34

2

시큐리티 필터 설정 질문입니다!

2

42

1

공통 코드 , 계층 구조 질문

1

37

1

강의 자료 위치

1

42

1