• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

과제 질문입니다. baseball game

18.11.14 13:06 작성 조회수 124

0

또 과제 제출에서 마지막 main() 부분이 fail 로 나오네요.

다른 함수는 다 success로 나오는데요...

막상 cmd에서 실행하면 정상적으로 작동 하는데 왜 fail 로 나올까요?

혹시 첨삭 가능한가요?

어떤 문제인지 몰라서 답답합니다.
'''
def main():
print("Play Baseball (Y/N)")
user_input = 999
yes_or_no = input()
while is_yes(yes_or_no) == True:
random_number = str(get_not_duplicated_three_digit_number())
print("Random Number is : ", random_number)
while is_yes(yes_or_no) == True:
print("Input Guess Number is:")
user_input = str(input())
input_1 = is_validated_number(user_input)
try:
if input_1 is True:
output = get_strikes_or_ball(user_input_number = user_input, random_number = random_number)
print("결과는 %d Strike" % output[0], "and %d ball 입니다." %output[1])
if output[0] == 3:
break
except TypeError:
output = False
print("다시 입력해주세요")
print("계속 하시겠습니까?")
yes_or_no_2 = input()
if is_yes(yes_or_no_2) == True: continue
break

==================================

print("Thank you for using this program")
print("End of the Game")

'''

답변 1

답변을 작성해보세요.

0

안녕하세요. 질문해주셔서 감사합니다.

아쉽게도 저희 과정상 Lab assignment에 대한 직접적인 답변을 제공해드리지는 않습니다.

넓은 마음으로 이해부탁드리겠습니다.