#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목step 12 마지막문제 질문드립니다!2021-04-13 20:10작성자웹파print("Guess the number chosen by name")print("If the number is smaller than the correct number, enter 0\nIf the number is bigger than the correct number, enter 2\nIf the number is correct, eneter 1")print("Let's start!")print()first = 1last = 100import randompy = random.randrange(first, last)print(py)myanswer = int(input("write your answer: "))while myanswer == 0 or 2 or 1: if myanswer == 0: first = py+1 py = random.randrange(first, last) print(py) myanswer = int(input("write your answer: ")) continue if myanswer == 2: last = py py = random.randrange(first, last) print(py) myanswer = int(input("write your answer: ")) continue if myanswer == 1: print() print("Correct answer!") break이렇게 코드를 짜면 결국 답이 나오긴합니다. 근데 여기서 노트북이 물어보는 숫자의 크기가 fistr와 last의 중간값으로 만들고 싶은데, 어떤 식으로 작성하면 되나요?? 조언 부탁드립니다! 목록수정삭제답변글쓰기 댓글 [1] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전[re]제 수업의 중간고사라면, 정지영 교수님 수업이라면 아닙니다.수강생2021-04-13다음중간고사 PsCheck 프로그램 사용여부 검출 관련중간고사2021-04-13 Powered by MangBoard | 워드프레스 쇼핑몰 망보드