我一个人在修理机器人,我被卡住了!这是一个代码,它提示用户从选项中选择获得多少张卡
7, 9, 11, and 15
def Cards():
print("Card Amounts")
print("\nChoices")
print(7)
print(9)
print(11)
print(15)
PlayerInput3()
def PlayerInput3():
global PlayersCards
PlayerInput = int(raw_input())
if(PlayerInput == 7):
PlayersCards == range(1,7)
print("Lets get started")
Game()
但是,当他们选择了多少张牌时,在定义结束后,它仍然有效。我希望玩家卡的范围继续在一个不同的定义区域。这里:
^{pr2}$但它不会继续过去
def Cards():
如何使PlayersCard==range(1,7)继续,而不管它是什么定义?在
我认为这个代码可以满足您的要求:
相关问题 更多 >
编程相关推荐