Project- Game of Tic Tac Toe with Python

13 / 16

Tic Tac Toe with Python - Time to switch turns

Next we will write a function called next_turn which simply switches controls. If the human player had moved, it will switch the turn to the AI, and vice versa.

  • Define the function next_turn as shown below:

    def <<your code goes here>>(turn):
        if turn == X:
            return O
            return X
See Answer

No hints are availble for this assesment

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

Loading comments...