def binarySearch(alist, item):
first = 0
last = len(alist)-1
found = False
while first<=last and not found:
midpoint = (first + last)//2
if alist[midpoint] == item:
found = True
else:
if item < alist[midpoint]:
last = midpoint-1
else:
first = midpoint+1
return found
alist = [1, 3, 5, 6, 7, ,9, 11, 20, 30, 56]
value = int(input("탐색하고자 하는 값은?"))
printf(binarySearch(alist, value))
while 에 괄호 - dc App
감사합니다!
그리고 왜 printf c아니자나 - dc App
그리고 담부턴 에러메시지 통째로 가꼬오삼 - dc App
넵! 근데 IDLE 3.9.5 쓰는데 어디가 에러인지 안알려 주던데 어떤 에디터 사용하면 에러 위치 알려주고 좋을까요?
떠임마 - dc App
vscode 쓰자
ㅇㅈ vscode ㄱㄱ - dc App
넵 다들 감사합니다!