Project- Game of Tic Tac Toe with Python

8 / 16

Tic Tac Toe with Python - Create function to display the board

Now we will create a function which will display the board we created in the last step.

INSTRUCTIONS
  • Define a function display_board which will show the board we created on the screen. This function accepts a list called board as an argument:

    def <<your code goes here>>(<<your code goes here>>):
        print("\n\t", board[0], "|", board[1], "|", board[2])
        print("\t", "---------")
        print("\n\t", board[3], "|", board[4], "|", board[5])
        print("\t", "---------")
        print("\n\t", board[6], "|", board[7], "|", board[8], "\n")
    
See Answer

No hints are availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...