#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목[re]실습자료 LOOP_PART_2 질문입니다2022-04-25 23:22작성자수업도우미 권인회import randomprint("Make your magic number (1...100)")input(prompt="Please enter to start.")limitLow = 1limitHigh = 101while True: intRandom = random.randrange(limitLow, limitHigh) print("My guess: ", intRandom) userInput = int(input(prompt="Enter your answer - lower(0), equal(1), larger(2): ")) if(userInput == 1): # equal print("Matched.") break elif(userInput == 0): # lower print("Move to lower range") limitHigh = intRandom else: #larger print("Move to higher range") limitLow = intRandom + 1#### 이 과정에서 LIMITLOW 라는 변수를 따로 두지 않고, 바로 1 로 두고, INTRANDOM = RANDOM.RANDRANGE(1,101)로 하면 안되나요??코드 내에서 변수를 재설정해주는 부분이 있으므로 안 됩니다. 랜덤을 계속 1~100 사이에서 돌리는게 아니라, 변수를 이용해 바꿔주고 있네요. 목록수정삭제답변글쓰기 댓글 [0] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전실습자료 LOOP_PART_2 질문입니다질문자2022-04-25다음실습 파일 step09 크리스마스 트리 만들기 질문입니다.수강셍2022-04-25 Powered by MangBoard | 워드프레스 쇼핑몰 망보드