您首先需要输入“ if”和“ elif”。所以应该是这样的:
def choice(game): #CHOOSING GAME
while game > 3 or game < 1:
print("\nSomething went wrong, enter game you want again (only numbers 1, 2, 3!")
game = int(input("--> "))
if game == '1': #bug here
print("You chose Coin flip game")
os.system('python coinflip.py')
elif game == '2': #and here
print("You chose Horse racing game")
os.system('python horseracing.py')
elif game == '3': #and here
print("You chose Loto game")
os.system("python loto.py")
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句