【发布时间】:2015-10-19 23:50:28
【问题描述】:
我最近在高中上过一个游戏开发课程,我们一直在使用 Mac 的终端运行 python 编码来制作基于文本的游戏。我认为是python 2.7的版本,我遇到了错误
while Menuselect != "play":
MenuSelect = raw_input("Type 'quit' to exit - 'credits' for credits - Type 'play' to start\n")
MenuSelect = MenuSelect.lower()
if MenuSelect == "quit":
SystemExit(0)
elif MenuSelect == "credits":
print("Lmao, only Matt made this")
else:
print("You mistyped. 10/10")
print(": You wake up in a dark room, you don't know where you are or how you got here :")
当我尝试运行它并输入“播放”以停止循环时,它只是再次继续循环。有什么问题吗?
【问题讨论】:
-
Menuselect 与 MenuSelect 不同
标签: python python-2.7 terminal