Registrations Closing Soon for DevOps Certification Training by CloudxLab | Registrations Closing in

  Enroll Now

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.

INSTRUCTIONS
  • 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
    

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...