oscore for in range( )for in range( )if board[ ][ =' 'xscore + if board[ ][ =' 'oscore + return {' ':xscore' ':oscorethe getscoreofboard(function uses nested for loops to check all spaces on the board ( rows times columns per row is spacesand see which tile (if anyis on them for each 'xtilethe code increments xscore on line for each 'otilethe code increments oscore on line getting the player' tile choice def enterplayertile() lets the player type which tile they want to be returns list with the player' tile as the first itemand the computer' tile as the second tile ' while not (tile ='xor tile =' ') print('do you want to be or ?' tile input(upper(this function asks the player which tile they want to beeither 'xor 'othe for loop will keep looping until the player types in 'xor ' the first element in the list is the player' tilethe second is the computer' tile if tile =' ' return [' '' ' else return [' '' 'the enterplayertile(function then returns two-item listwhere the player' tile choice is the first item and the computer' tile is the second line which calls enterplayertile()uses multiple assignment to put these two returned items in two variables determining who goes first def whogoesfirst() randomly choose the player who goes first