Question: Question 4 Tic Tac Toe (6 pts) Tic Tac Toe is a very common game that is played on a 3 by 3 grid by

Question 4 Tic Tac Toe (6 pts) Tic Tac Toe is a very common game that is played on a 3 by 3 grid by 2 player one with x and other with o. The winner of the game has to get 3 consecutive vertical or horizontal or diagnoal symbols. You will write a function tictactoe() that will take in a grid as list of tuples with each tuple represnting a row in the tic tac toe grid and return the winner of that grid. If there is no winner the function should return false Each value in the tuple can be x, 0, or In [ ]: def tictactoe(grid) : pass # YOUR CODE HERE raise Not ImplementedError() In [ ]: print("Test 1 : ", tictactoe([('_', 'x',' (o', ('x','o','o')]) == 'o') # The student is encouraged to try some test cases of their own design. In [ ]: In [ ]: In [ ]: In [ ]: In [ ]: In [ ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
