问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果
prompt = "Please tell me something,and I will repeat it to you:\n"
prompt += "If you enter'quit',you will end the program.\n"
while True:
if input(prompt) != 'quit':
print(input(prompt))
else:
break
Please tell me something,and I will repeat it to you:
If you enter'quit',you will end the program.
a
Please tell me something,and I will repeat it to you:
If you enter'quit',you will end the program.
aa
aa
Please tell me something,and I will repeat it to you:
If you enter'quit',you will end the program.
s
Please tell me something,and I will repeat it to you:
If you enter'quit',you will end the program.
ss
ss
Please tell me something,and I will repeat it to you:
If you enter'quit',you will end the program.