Project- Game of Tic Tac Toe with Python

5 / 16

Tic Tac Toe with Python - Create function to determine the position on the board

Now we will define another function which will ask for a number. This number corresponds to the board position as mentioned in the display_instructions function earlier.

  • Define the function ask_number as shown below. It will take 3 arguments; question, low, and high respectively.

    def <<your code goes here>>(<<your code goes here>>, <<your code goes here>>, <<your code goes here>>):
        response = None
        while response not in range(low, high):
            response = int(input(question))
        return response
See Answer

No hints are availble for this assesment

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

Loading comments...