• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

아무리 해도 fail가 나옵니다ㅠㅠ

19.02.05 01:20 작성 조회수 86

0

def main():

print("Play Baseball")

yes_or_no= "yes"

while is_yes(yes_or_no) is True:

user_input = "0"

random_number = str(get_not_duplicated_three_digit_number())

print("Random Number is : ", random_number)

user_input=input("Input guess number : ")

if user_input is "0":

break

while user_input is not "0" :

if is_validated_number(user_input) is False and user_input != "0":

print('Wrong Input, Input again')

user_input= input('Input guess number : ')

elif user_input == "0":

break

else:

if user_input == random_number:

print("Strikes : {0} , Balls : {1}".format(get_strikes_or_ball(user_input, random_number)[0],get_strikes_or_ball(user_input, random_number)[1]))

yes_or_no= input("You win, one more(Y/N) ?")

if yes_or_no == "0":

yes_or_no= "no"

break

while is_yes(yes_or_no)== False and is_no(yes_or_no)== False:

print('Wrong Input, Input again')

yes_or_no= input("You win, one more(Y/N) ?")

user_input= "0"

else:

print("Strikes : {0} , Balls : {1}".format(get_strikes_or_ball(user_input, random_number)[0],get_strikes_or_ball(user_input, random_number)[1]))

user_input=input('Input guess number : ')

if user_input == "0":

yes_or_no= "no"

print("Thank you for using this program")

print("End of the Game")

답변 2

·

답변을 작성해보세요.

0

안녕하세요. 저희가 Lab Assignment에 대한 질문은 따로 받지 않습니다. 하나 수강자들의 고통을 덜어드리는 차원에서 정말 모르겠다면 코드를 저희 연구실 이메일 teamlab.gachon@gmail.com 보내주시면 검토해드리겠습니다.

0

안녕하세요. 저희가 Lab Assignment에 대한 질문은 따로 받지 않습니다. 하나 수강자들의 고통을 덜어드리는 차원에서 정말 모르겠다면 코드를 저희 연구실 이메일 teamlab.gachon@gmail.com 보내주시면 검토해드리겠습니다.