【发布时间】:2015-09-22 17:28:01
【问题描述】:
classes = input("There are three types of classes in this game. Warrior, Wizard and Hunter. Pick one.")
if classes == "Warrior" or "Wizard" or "Hunter":
print ("Good choice.. the "+classes+" will dominate your opponents!")
else:
print ("That's not a class! Pick again!")
#基本上,我想添加一个循环,以便它会再次提问。
请记住,我使用的是 Python-3
【问题讨论】:
-
你需要使用while循环,而且or语句是错误的。