[훈련] 파이썬 – 최종 코드

ans = 38

min = 0
max = 100

while(True):
    guess = int(input("Please input a number that between %d ~ %d : "%(min, max)))
    if (guess > ans):
        max = guess
    if (guess < ans):
        min = guess
    if (guess == ans):
        print("Bingo!!")
        break

코멘트를 남겨주세요

유의하시기 바랍니다: 덧글 검토가 활성화되고 귀하의 코멘트를 지연시킬 수있다. 댓글을 다시 제출하실 필요는 없습니다.