인프런 커뮤니티 질문&답변
SyntaxError: unexpected EOF while parsing 괄호가 어디가 이상한지 모르겠습니다.
작성
·
580
0
def SequentialSearch (array, target):
global found
found=[]
count= pos = 0
while pos < len(array) :
if eval(array[pos][4])<=target: # 총 당류 비교
count+=1
found.append(food_list[pos][4])
else: pass
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='/')
실행해보니
답변
답변을 기다리고 있는 질문이에요
첫번째 답변을 남겨보세요!




