该脚本需要两个参数，游戏中所要求的玩家数量和玩的游戏数量。然后，它会生成一份报告，报告平均玩家数量。

import sys
 
if len(sys.argv) == 3:
    players = int(sys.argv[1])
    games = int(sys.argv[2]):

average = str( players / games)
print("The average number of players was: " + average)
协助调试 Python 脚本。
第三行代码存在语法错误，应该将 ":" 移除。正确的代码如下所示:

import sys
 
if len(sys.argv) == 3:
    players = int(sys.argv[1])
    games = int(sys.argv[2])

average = str( players / games)
print("The average number of players was: " + average)