-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
def main():
print("Play Baseball")
random_number = str(get_not_duplicated_three_digit_number())
print("Random Number is : ", random_number)
user_input = input("Input guess number : ")
while True :
if is_validated_number(user_input):
strike , ball = get_strikes_or_ball(user_input , random_number)
if strike == 3 :
while True :
strike , ball = get_strikes_or_ball(user_input , random_number)
print("Strikes : ", strike, "Balls : ", ball)
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)
user_input = input("Input guess number : ")
break
elif is_no(one_more_input):
print("Thank you for using this program")
print("End of the Game")
break
else :
print("Wrong Input, Input again")
else :
strike , ball = get_strikes_or_ball(user_input , random_number)
print("Strikes : ", strike, "Balls : ", ball)
user_input = input("Input guess number : ")
continue
else :
print("Wrong Input, Input again")
user_input = input("Input guess number : ")
교수님 다 되는데 n이나 no를 입력했을 때 게임이 끝나는 걸 해결을 못하겠습니다.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels