请注意,这是摘录。 elif DOES在完整的代码块中有一个if。游戏工作直到我决定添加一个随机选择,关于玩家如何出局
import random
howout = ['Bowled', 'Run-out', 'Caught', 'Stumped', 'LBW',]
elif playruns == 5:
playouts = playouts + 1
print("Your player is out!",random.choice(howout),)
答案 0 :(得分:0)
在你最后的括号之前,你有一个浮动的逗号。
print("Your player is out!",random.choice(howout),)
remove this ^