每当我尝试这个,它不工作(输入=6)。它把我送到上一个菜单,说输入无效。你知道吗
Code in Python that does not work.
def amount_of_Chests () :
chestCount = 0
amount_of_Chests_Display ()
while chestCount <4 :
chestCount_string = input("Please Make Sure You Enter Enough Chests\nPlease Enter How Many Chests You Would Like (Min.4)")
chestCount = int(chestCount_string)
if chestCount < 4 :
print ("\nThere Are Not Enough Chests, Please Try Again.")
amount_of_Chests_Display ()
if chestCount > 3 :
return chestCount
amount_of_Bandits ()
else :
print ("Sorry that input is not valid. Please try Again.\n")
在
return
语句之后不会执行任何代码,因此amount_of_Bandits()
永远不会被调用相关问题 更多 >
编程相关推荐