Enrollments Closing Soon for Online Instructor-Led DevOps Certification Training by CloudxLab | No Cost EMI Available

  Enroll Now

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.

  • 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")

No hints are availble for this assesment

Answer is not availble for this assesment

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

Loading comments...