Skip to content

baseball_game의 main 질문드립니다. #36

@gyeongmin-363

Description

@gyeongmin-363

def main():

print("Play Baseball")
user_input = 999
random_number = str(get_not_duplicated_three_digit_number())
print("Random Number is : ", random_number)
# ===Modify codes below=============
# 위의 코드를 포함하여 자유로운 수정이 가능함
while user_input != "0" :
    user_input = input("Input guess number : ")
    if is_validated_number(user_input): 
        strikes = get_strikes_or_ball(user_input, random_number)[0]
        ball = get_strikes_or_ball(user_input, random_number)[1]
        print(f'Strikes : {strikes} , Balls : {ball}')
        while strikes == 3:
            one_more_input = input("You win, one more(Y/N)?")
            if is_yes(one_more_input):
                random_number = str(get_not_duplicated_three_digit_number())
                print("Random Number is : ", random_number)
                break
            elif is_no(one_more_input):
                user_input = "0" 
                break
            else:
                print("Worng Input, Input again")
                pass
            
    else:
        print("Worng Input, Input again")
# ==================================
print("Thank you for using this program")
print("End of the Game")

cmd에 실행시켜보았을 때에는 잘 실행은 되지만 pass가 되지 않습니다.
무엇인 문제인지 알 수 있을까요?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions