由于您不喜欢我对程序的解释,因此我已将其纯粹更改为只是一个问题: 如何让程序继续检查输入是什么并根据适用的规则,直到输出亩无法让我的程序继续正常进行,直到返回true
x = input("Enter your string: ")
while not set(x).issubset({'m', 'u', 'i'}):
print("false")
x = input("Enter your string")
print("Your String is " + x)
if x == ("mu"):
print("game complete")
quit()
#I understand that right now I am only checking if x is mu and then
#displaying the question input
#not sure how to bring the rules into the loop too
else:
while x !=("mu"):
Question = int(input("Which rule would you like to apply? enter numbers 1-4: ")
if Question is 1:
x = (x + "l")
print(x)
elif Question is 2:
print("2")
elif Question is 3:
print("3")
elif Question is 4:
print("4")
elif Question is not 1 or 2 or 3 or 4:
print("invalid rule try again")
我不知道你在问什么。请尝试用简短的句子来写下你的问题,而不是无休止的晦涩难懂的话。 – Julien
我的问题是如何让程序继续检查输入是什么,并根据输出为mu来应用规则,只是认为人们想要了解该程序 –