Question: I need help writing/fixing this code. The warnings say 'return' outside function. My assingment is to write a systematic tic tac toe board game. Written


I need help writing/fixing this code. The warnings say 'return' outside function.
My assingment is to write a systematic tic tac toe board game.
Written in python 3.6
61 #%% 62 def GetNumberOfChessPieces (Board): 63 64 65 Parameter: Board is the game board, a 3x3 matrix Return: the number of chess piceces on Board i.e. the total number of 'X' and '0 67 68 69 70 71 72 counter 0 73 for i in range(0,3) 74 for j in range (0,3): 75 76 hint: define a counter and use a nested for loop, like this for i in0 to 3 for j in 0 to 3 add one to the counter if Board[i] [j] is not empty if (Board[i]ljl - "): countercounter 1 return counter A 77 78 % 79 def IsBoardFull (Board): 80 81 82 83 84 85 86 87 88 GetNumberOfChessPieces (Board,i,j) 89 if (Board != '' ); Parameter: Board is the game board, a 3x3 matrix Return: True or False Description: return True if the Board is fully occupied return False otherwise hint: use GetNumberOfChessPieces 90 return True 91 else: 92 return False 93 94
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
