There is a syntax error in the third line, the ":" should be removed. So the correct code should be as follows:

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)
The script takes two arguments, the required number of players in the game and the number of games played. It then produces a statement to report on the average number of players.

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)
Assistere nel debug di uno script Python.