// 匹配字符串程序
exact_word = "Guessing"
guess_kid = ""
guess_count = 0
guess_limit = 3
out_of_guesses = False
while guess_kid != exact_word.casefold() and not(out_of_guesses):
if guess_count < guess_limit:
guess_kid = input("Enter another word : ")
guess_count += 1
else:
out_of_guesses = True
if out_of_guesses:
print("Out of luck")
else:
print("you win")
// 三个错误输入后程序没有终止
MMMHUHU
翻过高山走不出你
相关分类