self players players self nplayer nowdefine the number of coins in the gamehere we are using coins for the game self num_coins define the maximum number of coins player can take in move self max_coins now there are some certain things to define as shown in the following code define possible moves def possible_moves(self)return [str(afor in range( self max_coins )define the removal of the coins def make_move(selfmove)self num_coins -int(movedefine who took the last coin def win_game(self)return self num_coins < define when to stop the gamethat is when somebody wins def is_over(self)return self win(define how to compute the score def score(self)return if self win_game(else define number of coins remaining in the pile def show(self)print(self num_coins'coins left in the pile'if __name__ ="__main__"tt tt(