#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목중간참조 4번 질문입니다2021-04-18 22:23작성자\\\def getResult(status): if status.find('_')==-1: return print('you win') else: return print('you lose')def updateStatus(word, x, status): if x in word: for v in range(len(word)): if word[v]==x: status=status[:v]+x+status[v+1:] new_status=status return new_status else: new_status=status return new_statusdef startGame(word): count=(len(word)) status='_'*len(word) a=input('{0}\n{1} chances. enter a letter : '.format(status,count)) while count!=0: if '_' not in status: break count=count-1 status=updateStatus(word,a,status) print(status) print(count,'chances',end='') a=input(' enter a letter : ') return getResult(status)6 chances enter a letter : M HIPPOPOTAM__ 5 chances enter a letter : U HIPPOPOTAMU_ 4 chances enter a letter : S HIPPOPOTAMUS 3 chances enter a letter : ??? you win None4chances 에 S를 넣으면 you win이 뜨면서 바로 끝나야 하는데 뒤에 input 하나가 더나옵니다... 그리고 마지막에 none이 뜨는 이유를 모르겠어요ㅏ 목록수정삭제답변글쓰기 댓글 [1] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전중간고사 시험 관련 질문있습니다.감사합니다2021-04-19다음assertion errorㄹㄹ2021-04-18 Powered by MangBoard | 워드프레스 쇼핑몰 망보드